Apache2 and nginx not starting

I’ve fixed the issue by adding “ExecStartPre=/bin/sleep 10” to /etc/systemd/system/multi-user.target.wants/nginx.service

From the article you linked to.

[Unit]
Description=nginx - high performance web server
Documentation=http://nginx.org/en/docs/
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target

[Service]
Type=forking
PIDFile=/var/run/nginx.pid
ExecStartPre=/bin/sleep 10
ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID

[Install]
WantedBy=multi-user.target

Thanks for your help :slight_smile:

5 Likes