nginx记录

cd /usr/local/nginx #到nginx目录下
./sbin/nginx      #启动nginx
./sbin/nginx -t   #检测配置文件
ps aux|grep nginx #查看nginx进程

nginx配置文件修改后,执行nginx -t successful。执行nginx -s reload报错:nginx: [error] invalid PID number "" in "/run/nginx.pid"

nginx -c /etc/nginx/nginx.conf #配置文件地址

执行nginx -s reload报错:Nginx [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)

fuser -k 80/tcp #干掉占用端口的程序
posted @ 2021-03-05 11:28  wattmelon  阅读(70)  评论(0编辑  收藏  举报