Job for openresty.service failed because the control process exited with error code.

在centos7中,启动openresty时报错:

Job for openresty.service failed because the control process exited with error code. See "systemctl status openresty.service" and "journalctl -xe" for details.

然后执行:

systemctl status openresty.service

发现:

● openresty.service - The OpenResty Application Platform
   Loaded: loaded (/usr/lib/systemd/system/openresty.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 四 2020-04-02 13:49:01 CST; 2min 14s ago

4月 02 13:49:01 localhost.localdomain systemd[1]: Starting The OpenResty Application Platform...
4月 02 13:49:01 localhost.localdomain nginx[3895]: nginx: [emerg] unknown directive "limit" in /usr/local/openresty/nginx/conf/nginx.conf:35
4月 02 13:49:01 localhost.localdomain nginx[3895]: nginx: configuration file /usr/local/openresty/nginx/conf/nginx.conf test failed
4月 02 13:49:01 localhost.localdomain systemd[1]: openresty.service: control process exited, code=exited status=1
4月 02 13:49:01 localhost.localdomain systemd[1]: Failed to start The OpenResty Application Platform.
4月 02 13:49:01 localhost.localdomain systemd[1]: Unit openresty.service entered failed state.
4月 02 13:49:01 localhost.localdomain systemd[1]: openresty.service failed.

查看以上信息,可知:

4月 02 13:49:01 localhost.localdomain nginx[3895]: nginx: [emerg] unknown directive "limit" in /usr/local/openresty/nginx/conf/nginx.conf:35

应该是该配置文件有误。最后成功。

你可能感兴趣的:(报错专区,linux,nginx,docker,centos)