周末服务器断电很多服务都挂了,今天只想着把后端服务起来,看着nacos上服务都注册上后就没有再看,但是前端问我怎么页面还是拒绝访问,才想到nginx也需要重启。

whereis nginx

找到sbin下,执行./nginx -s reload 提示我失败

No such process。

于是执行./nginx -t检查语法  提示我少一个文件  一个文件不存在,于是查了资料新建一下这个文件  

mkdir -pv /提示文件

再次检查语法 就不报错了。

然后执行重启还是不好使,仍然提示No such process,再次查资料 说重新加载nginx配置  

    whereis nginx #定位nginx文件位置
    /usr/local/nginx/nginx -c /usr/local/nginx/nginx.conf #指定配置文件地址
    nginx -s reload #重新加载配置文件

然后就解决了。记录一下,具体操作如下:

更多推荐

nginx failed (3: No such process)相关问题