How to use Custom Nginx Configuration in Nginx Proxy Manager - Advanced Edit Proxy Host?

You can pass the ip address so your application can see visitor's ip address:

location / {
    proxy_pass $forward_scheme://$server:$port;

    # Forward the real IP address of the client
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    # Forward other useful headers
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
}


Revision #2
Created 25 January 2025 16:54:44 by Son.KyLuat
Updated 25 January 2025 17:04:07 by Son.KyLuat