Вот лог ошибки:
2017/02/09 15:15:42 [error] 16231#0: *2535 upstream timed out (110: Connection timed out) while connecting to upstream, client: 188.163.106.67, server: ***, request: "GET / HTTP/1.1", upstream: "http://10.2.0.4:8080/", host: "n.***.net"
Конфиг nginx
location / {
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
try_files $uri $uri/ @fallback;
}
location / {
try_files /does_not_exists @fallback;
}
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @fallback;
}
}
location @fallback {
proxy_pass http://10.2.0.4:8080;
proxy_redirect http://10.2.0.4:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
access_log off ;
}
Конфиг апач:
...
Include conf.d/
Include vhosts-default/
Include vhosts/
Listen 127.0.0.1:8080
Listen 10.2.0.4:8080
Если открывать на прямую ип:8080, то работает.