Questions tagged «proxypass»

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 …

5
如果找不到上游主机,则安装程序nginx不会崩溃
我们在Docker的通用域下有多个Rails应用程序,并且我们使用nginx将请求定向到特定的应用程序。 our_dev_server.com/foo # proxies to foo app our_dev_server.com/bar # proxies to bar 配置看起来像这样: upstream foo { server foo:3000; } upstream bar { server bar:3000; } # and about 10 more... server { listen *:80 default_server; server_name our_dev_server.com; location /foo { # this is specific to asset management in rails dev …

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.