-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Nextcloud takes the remote ip of the proxy as remote address #1426
Comments
I have traefik instead of nginx, but assuming the request is similar, this could be something to check for your configuration. When looking at my request going through traefik, the only place the wrong IP can come from is Can you define this variable and assign it the ip ? See how it goes, maybe it will work :) Good luck |
Update: I have reinstalled Nextcloud on Docker, am using Traefik as reverse-proxy, and did NOT pass any of these environment arguments:
https://github.com/nextcloud/docker/ says
Edit: |
I have the same config as @Crocmagnon and tried the same things (but I'm using caddy) and nothing worked. In various posts on the nextcloud forum/github issues a lot of people are editing apache config files directly, so there's indeed something wrong with apache and not the reverse proxies themselves. |
I'm facing the same issue as many here apparently. I'm getting throttled on the login page because Nextcloud sees the proxy as the remote address and doesn't seem to use
X-Forwarded-For
orX-Real-IP
set by my reverse proxy.I'm running
nextcloud:apache
behindnginx-proxy-manager
. I confirmed that nginx-proxy-manager sets valid values for bothX-Forwarded-For
andX-Real-IP
:However, apache or nextcloud seem to ignore that.
Here's my nextcloud env:
I tinkered with
APACHE_DISABLE_REWRITE_IP
but setting it to1
didn't help.Here's also my config.php, edited to remove the noise and with my domain replaced by
cloud.example.com
:I don't fully understand the request flow inside the nextcloud container, the only thing I'm sure of is that the request comes in with both
X-Forwarded-For
andX-Real-IP
set to sensible values and that somehow it gets lost somewhere.I've spent really too much time tracking this issue already and I'm out of ideas. Could someone please help me debug this setup?
Thanks a lot! 🙏🏻
The text was updated successfully, but these errors were encountered: