启动Nginx出现这个错误
nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)

解决方法:
找到你的nginx.conf的文件夹目录,然后运行这个
nginx -c /usr/local/etc/nginx/nginx.conf (nginx.conf 的目录) 命令,
再运行nginx -s reload,就可以了
本文介绍了一种常见的Nginx启动错误,即找不到nginx.pid文件导致的错误,并提供了详细的解决步骤。首先,需要找到nginx.conf配置文件所在的目录,然后使用特定的命令重新加载Nginx配置。
启动Nginx出现这个错误
nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)

解决方法:
找到你的nginx.conf的文件夹目录,然后运行这个
nginx -c /usr/local/etc/nginx/nginx.conf (nginx.conf 的目录) 命令,
再运行nginx -s reload,就可以了
2149
2万+
1万+

被折叠的 条评论
为什么被折叠?