0%

openresty重启失败

[root@to8to nginx]# systemctl status openresty.service
● openresty.service - SYSV: OpenResty is a scalable web platform by extending
   Loaded: loaded (/etc/rc.d/init.d/openresty; bad; vendor preset: disabled)
   Active: failed (Result: resources) since Wed 2019-03-20 11:10:06 CST; 5min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 4473 ExecStart=/etc/rc.d/init.d/openresty start (code=exited, status=0/SUCCESS)

Mar 20 11:10:06 to8to.com systemd[1]: Starting SYSV: OpenResty is a scalable web platform by extending...
Mar 20 11:10:06 to8to.com systemd[1]: Failed to read PID from file /usr/local/openresty/nginx/logs/nginx.pid: Invalid argument
Mar 20 11:10:06 to8to.com systemd[1]: Failed to start SYSV: OpenResty is a scalable web platform by extending.
Mar 20 11:10:06 to8to.com systemd[1]: Unit openresty.service entered failed state.
Mar 20 11:10:06 to8to.com systemd[1]: openresty.service failed.

发现新建nginx.pid后,重启,又被自动删除
搜到一篇文章
https://blog.csdn.net/llnara/article/details/8691049
仿照用
openresty -c /usr/local/openresty/nginx/conf/nginx.conf
解决

-c的意思  
     -c file        Use an alternative configuration file.