diff --git a/etc/systemd/system/nginx.service.d/custom.conf b/etc/systemd/system/nginx.service.d/custom.conf index 1af5869..3248629 100644 --- a/etc/systemd/system/nginx.service.d/custom.conf +++ b/etc/systemd/system/nginx.service.d/custom.conf @@ -3,4 +3,6 @@ LimitNOFILE=100000 TimeoutStartSec=300 ExecStop= ExecStop=-/sbin/start-stop-daemon --quiet --stop --pidfile /run/nginx.pid +ExecStartPre= ExecStartPre=/usr/bin/install -Z -m 02755 -o www-data -g www-data -d /var/run/nginx +ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'