By lihao
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.
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!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.