Questions tagged «http-status-code-504»

8
Nginx反向代理导致504网关超时
我将Nginx用作接收请求的反向代理,然后执行proxy_pass以从端口8001上运行的上游服务器获取实际的Web应用程序。 如果我访问mywebsite.com或执行wget,则60秒后会收到504网关超时...但是,如果加载mywebsite.com:8001,则应用程序将按预期加载! 因此,有些事情阻止了Nginx与上游服务器进行通信。 这一切都是在我的托管公司重置我的东西正在运行的机器之后开始的,在那之前没有任何问题。 这是我的vhosts服务器块: server { listen 80; server_name mywebsite.com; root /home/user/public_html/mywebsite.com/public; access_log /home/user/public_html/mywebsite.com/log/access.log upstreamlog; error_log /home/user/public_html/mywebsite.com/log/error.log; location / { proxy_pass http://xxx.xxx.xxx.xxx:8001; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } 和我的Nginx错误日志的输出: 2014/06/27 13:10:58 [error] 31406#0: *1 upstream timed out (110: Connection timed out) while …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.