Plesk Nginx fail to start on boot

On a Debian Server with Plesk Control Panel, Nginx did not start on boot.

On checking status, i get

root@server:~# systemctl status nginx
* nginx.service - Startup script for nginx service
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
   Active: failed (Result: exit-code) since Mon 2018-01-22 18:30:19 CET; 2min 21s ago
  Process: 700 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
  Process: 646 ExecStartPre=/usr/bin/test $NGINX_ENABLED = yes (code=exited, status=0/SUCCESS)

Jan 22 18:30:19 nginx[700]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Jan 22 18:30:19 nginx[700]: nginx: [emerg] bind() to failed (99: Cannot assign requested address)
Jan 22 18:30:19 nginx[700]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jan 22 18:30:19 systemd[1]: nginx.service: control process exited, code=exited status=1
Jan 22 18:30:19 systemd[1]: Failed to start Startup script for nginx service.
Jan 22 18:30:19 systemd[1]: Unit nginx.service entered failed state.

/var/log/nginx/error_log had following error

2018/01/22 18:30:19 [emerg] 700#0: bind() to failed (99: Cannot assign requested address)


Edit nginx.service file

vi /etc/systemd/system/

Find line


Add above (on a new line)

ExecStartPre=/bin/sleep 60


Replace with

Reload service file

systemctl daemon-reload

Here is my modified nginx.service file

root@root1229:~# cat /lib/systemd/system/nginx.service
Description=Startup script for nginx service


.include /etc/default/nginx.systemd
# tuning of limits settings:
# 1. fill required limits as described in systemd.exec(5)
# 	nginx.systemd content example for number of open files:
# 	[Service]
# 	LimitNOFILE=8192
# 2. restart service

ExecStartPre=/bin/sleep 60
ExecStartPre=/usr/bin/test $NGINX_ENABLED = "yes"
ExecStartPre=/usr/sbin/nginx -t

ExecReload=/usr/bin/test $NGINX_ENABLED = "yes"
ExecReload=/usr/sbin/nginx -t
ExecReload=/bin/kill -s HUP $MAINPID

ExecStop=/bin/kill -s QUIT $MAINPID



Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *