nginx启动报错,nginx: [alert] kill(8895, 1) failed (3: No such process)

问题

        从镜像恢复系统后,nginx -s reload启动报错,nginx: [alert] kill(8895, 1) failed (3: No such process)

        根据网上的经验,重新指定nginx配置文件也报错

        whereis nginx

        /usr/local/nginx/nginx -c /usr/local/nginx/nginx.conf

        报错如下-bash: /usr/local/nginx/nginx: No such file or directory

解决办法

        (1)进入 cd /usr/local/nginx/conf/ 目录,编辑配置文件nginx.conf ;

        (2)在配置文件中有个注释的地方: #pid        logs/nginx.pid;

        (3)将注释放开,并修改为:pid    /usr/local/nginx/logs/nginx.pid;

        (4)在 /usr/local/nginx 目录下创建 logs 目录:mkdir /usr/local/nginx/logs

        (5)启动nginx服务:/usr/local/nginx/sbin/nginx

 

你可能感兴趣的:(nginx启动报错,nginx: [alert] kill(8895, 1) failed (3: No such process))