OSX 10.11 我安装了最新的nginx 1.9.9(从源代码编译) 配置文件/usr/local/conf/nginx.conf语法正确
监听8080端口时,没有问题,我可以请求http://example.local:8080
server {
listen 8080;
server_name example.local;
root HTML;
然后运行:
sudo lsof -i -P | grep -i "80"
nginx 8254 root 10u IPv4 0x643a3abbad7bf485 0t0 TCP *:8080 (LISTEN)
nginx 8392 yves 10u IPv4 0x643a3abbad7bf485 0t0 TCP *:8080 (LISTEN)
但是,当我将端口更改为80时,我无法访问http://example.local:80
server {
listen 80;
server_name example.local;
root html;
sudo nginx -s reload
nginx 8254 root 10u IPv4 0x643a3abbad7bf485 0t0 TCP *:8080 (LISTEN)
nginx 8254 root 18u IPv4 0x643a3abbadbb9485 0t0 TCP *:80 (LISTEN)
nginx 8430 yves 10u IPv4 0x643a3abbad7bf485 0t0 TCP *:8080 (LISTEN)
nginx 8430 yves 18u IPv4 0x643a3abbadbb9485 0t0 TCP *:80 (LISTEN)
Safari无法打开页面,但我仍然可以请求http://example.local:8080
非常奇怪.... Nginx正在监听80端口...我该怎么办?