出现问题:nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
解决办法:
① nginx默认启动端口是80,之前刚好在这个服务器启动了个80端口的tomcat。现解决方式如下:
查看80端口被占用的进程 # lsof -i:80
修改httpd的端口
# vi /etc/httpd/conf/httpd.conf
# systemctl restart httpd
② 关闭防火墙
# systemctl stop firewalld
重新启动nginx
# /usr/local/webserver/nginx/sbin/nginx