Nginx error: nginx: [error] invalid PID number “” in “/run/nginx.pid”

After the server is restarted, it is OK to execute nginx-T, but an error is reported when executing nginx-S Reload
nginx: [error] invalid PID number “” in “/run/nginx.pid”
Solutions:
You need to do it first
Nginx – c/etc/nginx/nginx. Conf
The path to the nginx.conf file can be found in the return of nginx-t.
nginx -s reload

Read More: