This is my nginx.conf
on cs2
:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
error_log /var/log/nginx/error.log notice;
error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
upstream web-spr {
server web-ws:80 max_fails=1 fail_timeout=10s;
server web-ws.atcs1.dom.com:80 max_fails=1 fail_timeout=10s;
}
server {
listen interface:80;
server_name web-ws.atcs2.dom.com;
location /service {
proxy_pass http://web-spr;
}
}
And this is my /etc/hosts
on cs2
:
154.25.39.126 web-ws.atcs1.dom.com # Remote Server IP on some other network
192.168.0.1 web-ws # eth0:1 (vitual interface) IP
10.10.107.235 interface # eth0 IP
And finally this is /etc/hosts
on my local PC:
208.225.249.12 web-ws.atcs2.dom.com
154.25.39.126 web-ws.atcs1.dom.com
Now the problem is that on web-ws:80
and 'web-ws.atcs1.dom.com:80` I have a up and running tomcat servers.
But when I access it from my local pc via http://web-ws.atcs2.dom.com
, for one hit it responds properly but on next hit it gives out a 404 error. I mean all the alternative hits return desired result and otherwise fails with 404 Error.
Error Logs show nothing.
Any clue on this? What wrong I am going with?