Nginx proxy to Nginx and IP forward

Hi all.

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.

Front server(nginx proxying request) Vhost config Nginx config

backend server(Nginx+PHP-FPM+MySQL) Vhost config

AhmadShamli Get Free 25GB backup storage here [b]https://copy.com?r=YAYUHD[/b]

Comments

Sign In or Register to comment.