nginx启动报错:Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details.

查看错误:sudo service nginx status -l

 nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

修改/etc/nginx/nginx.conf配置文件,80端口修改为8081

server {
    listen       8001 default_server;
    listen       [::]:8001 default_server;

sudo service nginx start,正常运行nginx。
sudo systemctl enable nginx
正常访问ok,http://公网IP:8001

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐