Openmediavault nginx failed after clearing logs.

Leave a comment

February 21, 2019 by aubreykloppers

Openmediavault nginx failed after clearing logs.

root@bigrage:~# systemctl status nginx.service
â nginx.service – A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-02-21 16:37:22 SAST; 25s ago
Docs: man:nginx(8)
Process: 21756 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 24ms

Feb 21 16:37:22 bigrage systemd[1]: Starting A high performance web server and a reverse proxy server…
Feb 21 16:37:22 bigrage nginx[21756]: nginx: [alert] could not open error log file: open() “/var/log/nginx/error.log” failed (2: No such file or directory)
Feb 21 16:37:22 bigrage nginx[21756]: 2019/02/21 16:37:22 [emerg] 21756#21756: open() “/var/log/nginx/access.log” failed (2: No such file or directory)
Feb 21 16:37:22 bigrage nginx[21756]: nginx: configuration file /etc/nginx/nginx.conf test failed
Feb 21 16:37:22 bigrage systemd[1]: nginx.service: Control process exited, code=exited status=1
Feb 21 16:37:22 bigrage systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Feb 21 16:37:22 bigrage systemd[1]: nginx.service: Unit entered failed state.
Feb 21 16:37:22 bigrage systemd[1]: nginx.service: Failed with result ‘exit-code’.
root@bigrage:~# mkdir -p /var/log/nginx; touch /var/log/nginx/access.log; touch /var/log/nginx/error.log
root@bigrage:~# service nginx restart

Everything after this came up 100%…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: