Nginx proxy to Nginx and IP forward
I've set up an nginx proxy to proxy another server which is also an nginx. Reason for me doing this is to avoid DDOS and by using proxy server with high bandwidth.
The problem is,after reading up all I can find through Google,seems I cant get the real IP to the backend nginx server. It keeps on giving me the IP of the proxy server.
Below are my nginx config on both. Hope someone can help me fix it.
backend server(Nginx+PHP-FPM+MySQL) Vhost config
Get Free USD10 in DigitalOcean credit https://www.digitalocean.com/?refcode=c224f768eb1c