Nginx重启时报错解决

[root@smoker-linux conf.d]# systemctl reload nginx.service
Job for nginx.service invalid.

解决方法:

鼎云博客

[root@smoker- /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/--linux conf.d]# 
● nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-07-16 11:45:23 CST; 16s ago
     Docs: http://nginx.org/en/docs/
  Process: 2146 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
 Main PID: 2147 (nginx)
   CGroup: /system.slice/nginx.service
           ├─2147 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
           └─2148 nginx: worker process

Jul 16 11:45:23 smoker-linux systemd[1]: Starting nginx - high performance web server...
Jul 16 11:45:23 smoker-linux systemd[1]:
Jul 16 11:45:23 smoker-linux systemd[1]: Started nginx - high performance web server.

看上边信息Nginx算是启动了 但是有个Failed,尝试访问服务也没问题,不过还是的解决这个Failed
网上查资料 又是一顿操作:
[root@smoker-linux conf.d]#  
[root@smoker-linux conf.d]#  
[root@smoker-linux conf.d]#  
[root@smoker-linux conf.d]# 
[root@smoker-linux conf.d]#  
● nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/nginx.service.d
           └─override.conf
   Active: active (running) since Mon 2018-07-16 11:56:57 CST; 8s ago
     Docs: http://nginx.org/en/docs/
  Process: 2186 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCESS)
  Process: 2191 ExecStartPost=/bin/sleep 0.1 (code=exited, status=0/SUCCESS)
  Process: 2189 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
 Main PID: 2190 (nginx)
   CGroup: /system.slice/nginx.service
           ├─2190 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
           └─2192 nginx: worker process

Jul 16 11:56:57 smoker-linux systemd[1]: Starting nginx - high performance web server...
Jul 16 11:56:57 smoker-linux systemd[1]: Started nginx - high performance web server.


鼎云博客
  • 最新评论
  • 总共0条评论