【发布时间】:2016-01-26 19:15:30
【问题描述】:
我正在运行一个节点应用程序和 nginx 1.8.0。在同一台服务器上。 Nginx 使用
路由请求server_name subdom.domain.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
一切正常。我现在想将我的 nginx 放在不同的服务器上,将配置更改为:
server_name subdom.domain.com;
location / {
proxy_pass http://<ipofthenewserver>:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
我得到的只是“504 网关超时”。
【问题讨论】:
标签: nginx