Adding webroot line breaks Nextcloud

Nextcloud version (eg, 10.0.3):
Operating system and version (Freenas 9.10):

I recently installed Nextcloud via PBI, it works just fine as long as i try to access it locally. As soon as i try to reverse proxy it via NGINX (and insert the “overwrite webroot” line in the config file), it cannot be accessed locally nor remotely via Do you have any idea?

Thank you very much.

Hmm, what are you trying to achieve with overwrite webroot?
Can it still be accessed via IP/host internally?
Do you have a DNS override internally that would allow systems to resolve without going out to the internet?

Basically i set up a reverse proxy in order to access all my jails remotely via HTTPS with the simple addition of /nameofthejail after my domain. Once the line is added nextcloud isn’t accessible anymore: depending on the browser you’re using, you’ll get different errors: Firefox is about too many redirects (for example).

It doesen’t even work locally with localIP/nextcloud

Bump of the day.

For remote and local access you have to decide if you want to access within a subfolder or not.
https://remote/nextcloud and https://localIP/nextcloud

Start with local access first. If you can too many redirects, you can use curl on your command line to see where you get redirected and then check your webserver config.

Just posted this on Github.
I tried many combination but could not get to make it to work.

Just install nextcloud vanilla plugin from freenas. Nextcloud can be accessed by IP or server name (nc2) and is working as design.

Adding the ‘overwritewebroot’ => ‘/nextcloud’ in the config.php, and got the too many redirects.

Here are the outputs of curl -sILk nc2/nextcloud | egrep ‘HTTP|Loc’ | sed ‘s/Loc/ -> Loc/g’ for both without and with the overwritewebroot

Without the overwritewebroot :
[user@anotherserver]$ curl -sILk nc2 | egrep ‘HTTP|Loc’ | sed ‘s/Loc/ -> Loc/g’
HTTP/1.1 302 Found
-> Location: http://nc2/login
HTTP/1.1 200 OK

Without the overwritewebroot :
[user@anotherserver]$ curl -sILk nc2/nextcloud | egrep ‘HTTP|Loc’ | sed ‘s/Loc/ -> Loc/g’
HTTP/1.1 302 Found
-> Location: /nextcloud/
HTTP/1.1 302 Found
-> Location: http://nc2/nextcloud/login
HTTP/1.1 302 Found
-> Location: http://nc2/nextcloud/login

and continue to loop