I have Nextcloud 30.0.1(apache) inside Ubuntu 24 vm
Reverse proxy is nginx on separate vm on same network
If I access over same network it works, if I access over Internet it works, but for some reason, if I access over site to site vpn it identifies client ip as reverse proxy ip, and throws headers warning, Can someone point where can be an error, or which logs to check?
Since it works over the internet which also goes through the reverse proxy, it is hard to tell what is wrong without more information. What software do you use to create the VPN?
Maybe post some details (e.g. reverse proxy configuration) and how you configured the VPN. Then someone might be able to help
I used wireguard on pfsense on one side and mikrotik on the other, I checked reverse proxy access log, it shows ip, which should be passed to nextcloud(nextcloud doesn’t get it)
/etc/nginx/nginx.conf
What side is the one used to access the reverse proxy? How did you configure routing, so that your local network is accessible through the site-to-site tunnel?
It became
'forwarded_for_headers' => array('HTTP_X_REAL_IP'),
It was
'forwarded_for_headers' =>
array (
0 => 'HTTP_X_FORWARDED',
1 => 'HTTP_FORWARDED_FOR',
),
remoteip.conf
RemoteIPHeader X-Forwarded-For
#RemoteIPTrustedProxy 172.156.10.13
RemoteIPInternalProxy 172.156.10.13
Replaced Trusted with internal
btw does somebody know why these changes made it work, like setting X_REAL_IP in config but setting X-Forwarded-For in remoteip.conf
And Internalproxy instead of TrustedProxy