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.
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.
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.