Reading Time: < 1 minute
When using Nginx Proxy Manager, you may notice that it does not return the REMOTE_ADDR header with the real client IP, but instead returns the IP of Nginx Proxy Manager.
To solve this issue, you need to follow these steps:
- Open Nginx Proxy Manager and access the proxy you want to fix, then click on Advanced
Now, paste this code inside Custom Nginx Configuration
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
After adding this code, you will receive a header with the client’s IP, which will now be HTTP_X_REAL_IP instead of REMOTE_ADDR.
Continuing with the translation:
And now you will receive a header with the client's IP, which will now be HTTP_X_REAL_IP instead of REMOTE_ADDR.
(Do not include the Reading Time). Return it directly in HTML format. Do not add any additional sentences. When you finish, add a PIPE at the end.