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 2025-01-25 16:54:44 UTC by Son.KyLuat
Updated 2025-01-25 17:04:07 UTC by Son.KyLuat