I’m running nginx as reverse proxy and TLS endpoint on my server and apache with nextcloud in a container.
It looks like Nextcloud takes the proxy IP as client IP:
- Your remote address was identified as “192.168.227.161” and is brute-force throttled at the moment slowing down the performance of various requests. If the remote address is not your address this can be an indication that a proxy is not configured correctly. For more details see the documentation
.
In my nginx config I have:
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
In my apache config, I have:
RemoteIPHeader X-Forwarded-For
RemoteIPTrustedProxy 192.168.0.0/16
And in my Nextcloud config.php, I have:
'forwarded_for_headers' => ['HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR'],
'trusted_proxies' => ['192.168.0.0/16'],
I’m sure, I’m missing something, but what?
TIA!