problem
After modifying the nginx.conf configuration, input it sbin/nginx -s reload
, and an error is reportednginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)
Solution
The methods on the Internet are mostly aimed at “nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)”
. To be honest, they may be useful, but I haven't changed it for a long time. . .
My problem is that the nginx.conf configuration file
is /data/www/KeyProject
written data/www/KeyProject
incorrectly, and it is not modified in other places. As shown in the figure, it should be behind the root , but what I wrote is that the position where it reports the error is not accurate, so I found Didn't find it for a long time. This is a big pit. . .
The Nginx.conf file must be careful, the location of its error may not be accurate