-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
overwritewebroot in config.php causes too many redirects behind nginx reverse proxy #20338
Comments
I played around with htaccess.RewriteBase, overwritehost, overwrite.cli.url, ... No success. |
careful bump |
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 : Without the overwritewebroot : |
thanks , in my case adding the "location /nextcloud" instead of "location /" in 443 section of proxy config solved the issue |
Hello. Do you mind sharing which line in which proxy config file you edited? |
I had this exact issue and have it fixed. In my opinion this proves it is not an issue/bug with nextcloud but faulty config in the reverse proxy (although I found it hard to find proper documentation for this). |
Thank you for taking the time to report a bug! 👍 As this seems to be a setup issue I would like to ask you to raise your question in the forums: https://help.nextcloud.com |
nextcloud 25 and still not fixed |
Steps to reproduce
podman run -d --rm --name nextcloud --network nginx-network nextcloud
podman run -d --name nginx -v nginx-conf.d:/etc/nginx/conf.d/ -v nginx-certs:/etc/nginx/certs/ --network nginx-network -p 80:80 -p 443:443 nginx
Expected behaviour
Redirect to nextcloud login under
https://192.168.2.81/nextcloud/login
Actual behaviour
Infinite HTTP 302 Found loop with
Location
https://192.168.2.81/nextcloud/login`Changing
location /nextcloud {
tolocation / {
indefault.conf
and removingoverwritewebroot
inconfig.php
results in a working nextcloud instance underhttps://192.168.2.81
.Server configuration
Operating system: Fedora 31 Server with podman
Web server: nginx 1.17.9 reverse proxy,
docker.io/library/nextcloud latest 13712f835d9a
Database: SQLite
PHP version:
docker.io/library/nextcloud latest 13712f835d9a
Nextcloud version: (see Nextcloud admin page)
docker.io/library/nextcloud latest 13712f835d9a
Updated from an older Nextcloud/ownCloud or fresh install: fresh install
Where did you install Nextcloud from: container image
docker.io/library/nextcloud latest 13712f835d9a
The text was updated successfully, but these errors were encountered: