I'm trying to construct reverse proxy server using nginx on centos 7.
I installed nginx and also nodejs for local web server.
I would like to redirect requests on nginx to local nodejs server (http://localhost:5000).
So, following this page www.packethead.net/2015/01/05/setup-nginx-reverse-proxy/
, i modified /etc/nginx/nginx.conf file like below.
server {
listen 80;
server_name *.example.org; # my domain
location / {
proxy_set_header x-real-IP $remote_addr;
proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;
proxy_set_header host $host;
proxy_pass http://127.0.0.1:5000;
}
}
Then, using systemctl restart nginx.service
command, I restartd nginx.
When i access example.org on browser, just i can see this.
Is there any special configuration which have to be added? Is my above configuration file not correct??
I can not even guess what's fault.
I watched many explanation for reverse proxy.
Can you guys recommend easy explanations for me?
Thanks for watch.