Answer the question
In order to leave comments, you need to log in
How to set an nginx rule for nextcloud so that you can see from which ip the request was made?
situation:
there is a separate nginx server on the proxmox server, there is a separate nextcloud server, in addition to it, five more nearby
80 and 443 ports are redirected to nginx through the router, and it already directs them to nextcloud , everything works good BUT,
nginx (.41 ip) sees that the user came from the nginx server, and not from an external ip, so if there are a lot of incorrect requests (which happened to me once), the server DDOS came out with incorrect logins / passwords
, how to "forward" the external ip to nextcloud through nginx?
Answer the question
In order to leave comments, you need to log in
ngx_http_realip_module
Parable IP can be obtained from X-Forwarded-For or from X-Real-IP if configured.
UPD
And it 's even easier .
Just add a titleX-Forwarded-For
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question