OS/Release: Ubuntu 18.04.3 LTS
Product Name/Version: AMP V1.8.8.0
Problem Description: I had Nginx (1.14.0) setup through the AMP setup to provide a TLS reverse proxy, but it seems that with the generated configuration the client's IP address is not heeded by AMP and only returns 127.0.0.1 whenever accessed through the reverse proxy (this can be seen either in AMP's active sessions, by using "ampinstmgr View" or by viewing the logs).
Steps to reproduce:
- Install AMP with Nginx and Certbot (automated within the getamp.sh script)
- Login
Check the sessions in AMP or the logs once that is done and the client's IP address will be 127.0.0.1.
Actions taken to resolve so far: I don't remember every single change I have made, but I tried a few different combinations in the Nginx configuration including stuff like "setrealip_from" without success.
Here is an example of the config I have for the ADS instance in Nginx:
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_redirect off;
proxy_buffering off;
client_max_body_size 10240M;
}
Everything is untouched except for the WebSocket addition (the "upgrades") - everything other than that was generated, and even without that it was still not working.
So does AMP itself not heed forwarded IP addresses? Or is my Nginx configuration incorrect?