Question

Can't start Nginx - Job for nginx.service failed

nginx -t -c /etc/nginx/nginx.conf successful

/var/tmp/nginx/client This path already exists

[root@localhost client]# systemctl status nginx.service -l ● nginx.service - nginx Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2016-12-01 17:12:07 PST; 1h 6min ago

Dec 01 17:12:07 localhost.localdomain systemd[1]: Starting nginx… Dec 01 17:12:07 localhost.localdomain nginx[7706]: nginx: [emerg] mkdir() “/var/tmp/nginx/client/” failed (2: No such file or directory) Dec 01 17:12:07 localhost.localdomain systemd[1]: nginx.service: control process exited, code=exited status=1 Dec 01 17:12:07 localhost.localdomain systemd[1]: Failed to start nginx. Dec 01 17:12:07 localhost.localdomain systemd[1]: Unit nginx.service entered failed state. Dec 01 17:12:07 localhost.localdomain systemd[1]: nginx.service failed. Dec 01 17:26:32 localhost.localdomain systemd[1]: Stopped nginx. Dec 01 17:28:44 localhost.localdomain systemd[1]: Stopped nginx. Dec 01 18:07:51 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/nginx.service:1] Unknown section ‘aUnit’. Ignoring.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

sudo nginx -t

This command will check your configuration files for nginx and provide some information on where the problem may be. It does look like the directory /var/tmp/nginx doesn’t exist while the service is trying to use it.