Hi,
I am done with my following configuration and it works,
make sure your firewall allows those ports
server {
listen 80;
location / {
proxy_pass "http://IP_AppServer:80";
proxy_set_header X-proxy IP_Nginx;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_next_upstream error timeout invalid_header http_500 http_404;
proxy_set_header X-Client-IP $remote_addr;
}
}
server {
listen 8080;
location / {
proxy_pass "http://IP_AppServer:8080";
proxy_set_header X-proxy IP_Nginx;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_next_upstream error timeout invalid_header http_500 http_404;
proxy_set_header X-Client-IP $remote_addr;
}
}
I am done with my following configuration and it works,
make sure your firewall allows those ports
server {
listen 80;
location / {
proxy_pass "http://IP_AppServer:80";
proxy_set_header X-proxy IP_Nginx;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_next_upstream error timeout invalid_header http_500 http_404;
proxy_set_header X-Client-IP $remote_addr;
}
}
server {
listen 8080;
location / {
proxy_pass "http://IP_AppServer:8080";
proxy_set_header X-proxy IP_Nginx;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_next_upstream error timeout invalid_header http_500 http_404;
proxy_set_header X-Client-IP $remote_addr;
}
}