pingostack/pingos

修改http listen 端口错误

batdkuwlh opened this issue · 3 comments

http {
server {
listen 8080;
}
}
不能修改除80外的其他端口,日志如下
2021/07/26 04:01:58 [notice] 27712#0: using the "epoll" event method
2021/07/26 04:01:58 [notice] 27712#0: nginx/1.17.5
2021/07/26 04:01:58 [notice] 27712#0: built by gcc 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
2021/07/26 04:01:58 [notice] 27712#0: OS: Linux 4.15.0-20-generic
2021/07/26 04:01:58 [notice] 27712#0: getrlimit(RLIMIT_NOFILE): 1024:1048576
2021/07/26 04:01:58 [notice] 27713#0: start worker processes
2021/07/26 04:01:58 [notice] 27713#0: start worker process 27714
2021/07/26 04:01:58 [emerg] 27714#0: multiport, can not find relation port: 80
2021/07/26 04:01:58 [notice] 27713#0: signal 17 (SIGCHLD) received from 27714
2021/07/26 04:01:58 [notice] 27713#0: worker process 27714 exited with code 2
2021/07/26 04:01:58 [alert] 27713#0: worker process 27714 exited with fatal code 2 and cannot be respawned

因为有其他关联的地方用到了80

http {
server {
listen 8080;
}
}
不能修改除80外的其他端口,日志如下
2021/07/26 04:01:58 [notice] 27712#0: using the "epoll" event method
2021/07/26 04:01:58 [notice] 27712#0: nginx/1.17.5
2021/07/26 04:01:58 [notice] 27712#0: built by gcc 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
2021/07/26 04:01:58 [notice] 27712#0: OS: Linux 4.15.0-20-generic
2021/07/26 04:01:58 [notice] 27712#0: getrlimit(RLIMIT_NOFILE): 1024:1048576
2021/07/26 04:01:58 [notice] 27713#0: start worker processes
2021/07/26 04:01:58 [notice] 27713#0: start worker process 27714
2021/07/26 04:01:58 [emerg] 27714#0: multiport, can not find relation port: 80
2021/07/26 04:01:58 [notice] 27713#0: signal 17 (SIGCHLD) received from 27714
2021/07/26 04:01:58 [notice] 27713#0: worker process 27714 exited with code 2
2021/07/26 04:01:58 [alert] 27713#0: worker process 27714 exited with fatal code 2 and cannot be respawned

请同时修改 multi_listen unix:/tmp/http 80; 这个配置是用来实现多进程直接回源用的。

multi_listen unix:/tmp/http 8080;

好的,谢谢