Nginx not starting

Please help me to solve nginx not starting error:

I run as other post sugested:

nginx -t
systemctl status nginx --no-pager -l
journalctl -xeu nginx.service
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit nginx.service has finished with a failure.
░░ 
░░ The job identifier is 85 and the job result is failed.
Apr 14 14:19:06 cp.my-server.app systemd[1]: Starting nginx.service - nginx - high performance web server...
░░ Subject: A start job for unit nginx.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit nginx.service has begun execution.
░░ 
░░ The job identifier is 270.
Apr 14 14:19:26 cp.my-server.app nginx[11167]: nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" >
Apr 14 14:19:26 cp.my-server.app nginx[11167]: nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate "/home/my-user/conf/web/>
Apr 14 14:19:26 cp.my-server.app nginx[11167]: nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate "/home/my-user/conf/web/>
Apr 14 14:19:46 cp.my-server.app nginx[11167]: nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" >
Apr 14 14:20:06 cp.my-server.app nginx[11167]: nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" >
Apr 14 14:20:26 cp.my-server.app nginx[11167]: nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" >
Apr 14 14:20:36 cp.my-server.app systemd[1]: nginx.service: start operation timed out. Terminating.
Apr 14 14:20:36 cp.my-server.app systemd[1]: nginx.service: Failed with result 'timeout'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit nginx.service has entered the 'failed' state with result 'timeout'.
Apr 14 14:20:36 cp.my-server.app systemd[1]: Failed to start nginx.service - nginx - high performance web server.
░░ Subject: A start job for unit nginx.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit nginx.service has finished with a failure.
░░ 
░░ The job identifier is 270 and the job result is failed.
root@cp:~# nginx -t
systemctl status nginx --no-pager -l
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" in the certificate "/home/my-user/conf/web/my-server.app/ssl/my-server.app.pem"
nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate 
nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate 
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder 
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" in the certificate 
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" in the certificate 
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" in the certificate 
nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the cert
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" in the certificate 
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" in the certificate 
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder 
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder 
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder 
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" in the certificate 0
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" in the certificate 
nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate 
nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate 
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
● nginx.service - nginx - high performance web server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: activating (start) since Tue 2026-04-14 14:27:24 EEST; 14s ago
       Docs: https://nginx.org/en/docs/
  Cntrl PID: 13491 (nginx)
      Tasks: 1 (limit: 2273)
     Memory: 3.6M
        CPU: 17ms
     CGroup: /system.slice/nginx.service
             └─13491 /usr/sbin/nginx -c /etc/nginx/nginx.conf

Apr 14 14:27:24 cp.my-server.app systemd[1]: Starting nginx.service - nginx - high performance web server...

root@cp:~# systemctl status nginx
× nginx.service - nginx - high performance web server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: failed (Result: timeout) since Tue 2026-04-14 14:32:49 EEST; 11s ago
       Docs: https://nginx.org/en/docs/
    Process: 13927 ExecStart=/usr/sbin/nginx -c ${CONFFILE} (code=killed, signal=TERM)
        CPU: 36ms

Apr 14 14:31:19 cp.my-server.app systemd[1]: Starting nginx.service - nginx - high performance web server...
Apr 14 14:31:39 cp.my-server.app nginx[13927]: nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" >
Apr 14 14:31:39 cp.my-server.app nginx[13927]: nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate "/home/myuser/conf/web/>
Apr 14 14:31:39 cp.my-server.app nginx[13927]: nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate "/home/myuser/conf/web/>
Apr 14 14:31:59 cp.my-server.app nginx[13927]: nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" >
Apr 14 14:32:19 cp.my-server.app nginx[13927]: nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" >
Apr 14 14:32:39 cp.my-server.app nginx[13927]: nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" >
Apr 14 14:32:49 cp.my-server.app systemd[1]: nginx.service: start operation timed out. Terminating.
Apr 14 14:32:49 cp.my-server.app systemd[1]: nginx.service: Failed with result 'timeout'.
Apr 14 14:32:49 cp.my-server.app systemd[1]: Failed to start nginx.service - nginx - high performance web server.

yesterday, i just press start service and it worked. now this solution is not working:

Show the output of these commands:

ss -plntH | awk '{print $1"|"$4"|"$5"|"$6,$7,$8}' | awk -F'"' '{print $1,$2}' | sed -E -e 's/users:\(\(//' -e 's/\|\s+/|/' | grep -E ':80\||:443\|' | sort -V -k2 -t '|' | column -t -s '|' -l 4 -N State,"Local Address:Port","Peer Address:Port","Process"
ps -ef | grep -Ei '[n]ginx'
nginx -t
systemctl stop nginx
nginx -g "daemon off;"

if the last command doesn’t show anything and it keeps running, close it with Ctrl+C.

(post deleted by author)

Thank you very much for your answer.

In the meantime I executed the last command you have mentioned: nginx -g “daemon off;” and the services have started after few good seconds (probably 1-2 minutes), then I stop it with ctr+c, the services stopped, after that I start normally the nginx services and everything is back to normal. I have no idea why this happened.

Anyway I executed only first 3 commands from you now and this is what I got:

root@cp:~# ss -plntH | awk '{print $1"|"$4"|"$5"|"$6,$7,$8}' | awk -F'"' '{print $1,$2}' | sed -E -e 's/users:\(\(//' -e 's/\|\s+/|/' | grep -E ':80\||:443\|' | sort -V -k2 -t '|' | column -t -s '|' -l 4 -N State,"Local Address:Port","Peer Address:Port","Process"
ps -ef | grep -Ei '[n]ginx'
nginx -t
State   Local Address:Port  Peer Address:Port  Process
LISTEN  90.44.137.500:80    0.0.0.0:*          nginx
LISTEN  90.44.137.500:443   0.0.0.0:*          nginx
root         715       1  0 14:13 ?        00:00:00 nginx: master process /usr/local/hestia/nginx/sbin/hestia-nginx
hestiaw+     718     715  0 14:13 ?        00:00:00 nginx: worker process
root       23272       1  0 15:02 ?        00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
www-data   23273   23272  0 15:02 ?        00:00:01 nginx: worker process
www-data   23274   23272  0 15:02 ?        00:00:00 nginx: cache manager process
nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate "/home/my-user/conf/web/my-server.app/ssl/my-server.app.pem"
nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate "/home/my-user/conf/web/my-server.app/ssl/cp.my-server.app.pem"
nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate "/home/my-user/conf/web/my-server.app/ssl/demo2.my-server.app.pem"
nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate "/home/my-user/conf/mail/my-server.app/ssl/my-server.app.pem"
nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate 
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

The IP is modified.

When was not working starting or querying status of nginx services took about 1 minutes and it was very slow. Also I rebooted the vps few times, without any luck.

Do you have any idea why this might happened? I am afraid that tomorrow I will have to do this again.

Thanks

1 Like

I suppose some nginx process was still running and when doing systemctl stop nginx it finally stopped those processes.

1 Like