I'm using NODE.js behind NGINX server, this is my Nginx configuration:
upstream example.it {
server 127.0.0.1:8000;
}
server {
server_name www.example.it;
location / {
proxy_pass http://example.it;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
All works good, the requests are correctly sent from nginx to node BUT I saw a problem in the log file generated from Express.js.
The problem is that ALL THE REQUESTS are saved as done from 127.0.0.1, why?
I don't seen any remove hosts (the real ip of who made the request).
Thanks