Fehler beim Starten von Nginx im Systemctl-Modus unter Centos
天蓬老师
天蓬老师 2017-05-16 17:15:10
0
3
608

Laut Protokoll existiert das Verzeichnis /tmp/nginx/client_temp nicht, aber ich habe es mehrmals überprüft und festgestellt, dass ich direkt mit /usr/local/nginx/sbin/nginx gearbeitet habe. Ich kann den Grund wirklich nicht finden, bitte geben Sie mir eine Anleitung!!

Der Fehler ist wie folgt:

[root@iZ94ss71ojfZ nginx]# systemctl status nginx
nginx.service - nginx - high performance web server
   Loaded: loaded (/etc/systemd/system/nginx.service; enabled)
   Active: failed (Result: exit-code) since Thu 2016-08-18 01:33:15 CST; 1s ago
     Docs: http://nginx.org/en/docs/
  Process: 15731 ExecStartPre=/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf (code=exited, status=1/FAILURE)

Aug 18 01:33:15 iZ94ss71ojfZ systemd[1]: Starting nginx - high performance web server...
Aug 18 01:33:15 iZ94ss71ojfZ nginx[15731]: nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
Aug 18 01:33:15 iZ94ss71ojfZ nginx[15731]: nginx: [emerg] mkdir() "/tmp/nginx/client_temp" failed (2: No such file or directory)
Aug 18 01:33:15 iZ94ss71ojfZ nginx[15731]: nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
Aug 18 01:33:15 iZ94ss71ojfZ systemd[1]: nginx.service: control process exited, code=exited status=1
Aug 18 01:33:15 iZ94ss71ojfZ systemd[1]: Failed to start nginx - high performance web server.
Aug 18 01:33:15 iZ94ss71ojfZ systemd[1]: Unit nginx.service entered failed state.
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

Antworte allen(3)
Peter_Zhu

目录如果存在,应该要考虑权限问题

巴扎黑

看着像是缓存的路径配置有问题,题主可以查看配置文件为啥会有这个路径"/tmp/nginx/client_temp",如果是有意为之,则要确保该路径存在、并且有相应的读写权限。

大家讲道理

试试nginx -c your_conf_file,如果这个能成功,一般是权限问题。

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!