Tag Archives: nginx server

nginx: [error] invalid PID number in /var/run/nginx.pid

[root@centos7 conf.d]# nginx -s reopen
nginx: [warn] conflicting server name "localhost" on 0.0.0.0:80, ignored
nginx: [error] invalid PID number "" in "/var/run/nginx.pid"

Set the loaded configuration file to:

[root@centos7 conf.d]# nginx -c /etc/nginx/nginx.conf
[root@centos7 conf.d]# nginx -s reload
[root@centos7 conf.d]# nginx -v
nginx version: nginx/1.18.0
[root@centos7 conf.d]# nginx -s reopen
[root@centos7 conf.d]#