[NGINX] Cannot reset password

Hi everyone,

I deployed owncloud last week and in testing now. All worked well except reset password and setup new password for new user not working. Detail as bellow:

  1. My owncloud server: ubuntu 20.04
  2. Using nginx proxy

When choose forget password, a link will be send to my email, I can enter password 2 times and when click reset, it not response, no error or redirect to any website. Checking F12 on network tab, it show Status blocked:csp and only one thing I notice is Referrer Policy: no-referrer

Checking owncloud.log and apache2/access.log, error.log and other_vhosts_access.log, nothing show up when I click Reset.

Anything to help troubleshooting please?

Thanks,
Pettra

Hi Petra,

have you deployed ownCloud using our official documentation?

Best Regards

Dmitry

Hi dmitry,

Yes I deployed with link official document: Install ownCloud on Ubuntu 20.04 :: ownCloud Documentation

Also do theme changed: Theming ownCloud :: ownCloud Documentation

The change password worked perfectly, but reset password doesnt work. I notice the URL recevied for reset password using my username, not email, is it normal?

Thanks,
Pettra

Hi Petra,

you can check if your email is correctly entered with this occ command on the command line:

occ user:list -a email

What do you have set for this parameter in the config.php?

overwrite.cli.url

It should be your server address (IP or domain name), per default it’s set to localhost which can cause issues.

Best Regards

Dmitry

Hi Dmitry,

The list email show correctly. in config.php :
‘overwrite.cli.url’ => ‘http://localhost’,

I changed to ‘overwrite.cli.url’ => ‘http://my_server_ip’ and ‘overwrite.cli.url’ => ‘http://my_domain.com’ but both still not work. Already restart apache2 after change.

When I click Reset password it spining for few seconds and then go back to the same page with any error showing.

In console F12 in chrome I can see this showing when I click Reset password:

/underscore/underscore-umd.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
jquery.js:8630 Refused to connect to ‘http://mydomain.com/index.php/lostpassword/set/eLr52ZOzJa94hOv6zmIZR/Pettra’ because it violates the following Content Security Policy directive: “connect-src ‘self’”.

send @ jquery.js:8630
ajax @ jquery.js:8166
n. @ jquery.js:8311
resetPassword @ lostpassword.js?v=77d709453dc169a644bc19c1035e4fe3:82
dispatch @ jquery.js:4435
r.handle @ jquery.js:4121

I hope this help.

Regards,
Peter

Can you try it without the proxy?

Out guide works 100% on apache2 web servers. I suspect you may have to change something in your nginx settings.

Hi dmitry,

Confirmed it work without nginx, seems like my nginx config have issue. Do you have any example how to do NGINX please?

Regards,
Pettra

Hi Petra,

we officially recommend just using apache, but we have an unofficial NGINX docs right here in the forum:

https://central.owncloud.org/t/nginx-documentation-unofficial-community/22365/14

Best Regards

Dmitry

Many thanks dmitry

Regards,
Pettra