nginx -s reload时候报错:nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory)
解决方法:
使用指定nginx.conf文件的方式重启nginx:
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
报错:nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] still could not bind()
查看端口占用情况:
netstat -anon | grep 443
关闭占用443端口的程序
fuser -k 443/tcp
重启nginx:
systemctl restart nginx
查看Nginx状态:
systemctl status nginx -l