Rus*_*ssj 3 proxy nginx node.js meteor
我正在使用托管流星应用程序的 DigitalOcean VPS。我还没有域名,所以只使用普通 IP 地址。当我在下面设置 config 并使用myipaddress:3000and 时myipaddress:8080,它们都运行良好;但如果我将 8080 更改为 80,则仅myipaddress:3000有效。仅使用myipaddress或myipaddress:80将显示“欢迎使用 Debian 上的 nginx!” 信息。(我在 VPS 上使用 Ubuntu 14.04)。
server {
listen 8080;
server_name default;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Run Code Online (Sandbox Code Playgroud)
无法弄清楚为什么不能使用端口 80。
----解决了这个问题--------
我在 /etc/nginx/sites-enabled/default 文件中注释掉了“listen 80 default_server”,然后我在“/etc/nginx/conf.d/mysite.conf”中的配置在端口 80 上工作。
| 归档时间: |
|
| 查看次数: |
9053 次 |
| 最近记录: |