一台linux服务器中的ngix 2服务器块

时间:2018-09-29 14:55:43

标签: linux nginx

因为得到server { listen 80 default_server; listen [::]:80 default_server; server_name api.example.com; location / { proxy_pass http://localhost:3001; 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; } } server { listen 443; server_name staging-api.example.com; location / { proxy_pass http://localhost:3002; 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; } } ,所以我无法重新启动nginx。多个服务器块如何工作?没有登台服务器块,我的配置可以正常工作。

from wtforms.validators import Length

1 个答案:

答案 0 :(得分:0)

netstat -anp | grep :443更改哪个应用程序占用了端口443,并且如果不需要,请杀死它,然后重新启动nginx