Plesk Nginx Failed to Start: How to Diagnose and Fix the Error

Overview

A Plesk nginx error that prevents the web server from starting is one of the most disruptive things that can happen on a Linux hosting server. Every domain on that machine goes down instantly, and the error messages Plesk shows in the UI are often vague enough to be useless — something like “Web server failed to start” or nothing at all beyond a red status indicator.

This happens more often than it should. Common triggers include a bad SSL certificate configuration, a syntax error introduced after editing an nginx config file manually, a port conflict from another process, or a Plesk panel update that overwrites a custom include file. The nginx process itself is usually fine — it’s the configuration feeding into it that breaks.

This article applies to Plesk Obsidian 18.x and Plesk Onyx on CentOS 7, AlmaLinux 8/9, Debian 10/11/12, and Ubuntu 20.04/22.04. If you’re on a VPS SSD Hosting plan with root SSH access, you can follow every step here directly. Shared hosting users will need to open a support ticket for steps that require root.

Prerequisites

  • Root or sudo SSH access to the server
  • Plesk Obsidian 18.0 or later (most steps apply to Onyx 17.x as well)
  • A terminal client — PuTTY, iTerm2, or any SSH client works
  • Basic comfort running Linux commands (copy-paste is fine — you don’t need to memorise anything)
  • A recent backup of any custom nginx config files you’ve added under /etc/nginx/conf.d/ or Plesk’s include directories

Step-by-Step Instructions

Step 1: Check the Actual nginx Error Log First

Don’t touch anything yet. The single most important thing is reading what nginx actually complained about before it exited. Run this:

systemctl status nginx
journalctl -u nginx --no-pager -n 50

Look for lines starting with [emerg] or [crit]. These tell you exactly which file and line number caused the failure. Write it down — everything else follows from that.

You can also check the nginx error log directly:

tail -n 100 /var/log/nginx/error.log

📝 Note: On some Plesk installs, nginx logs are under /var/log/sw-cp-server/ rather than /var/log/nginx/. Check both if the first one is empty.

Step 2: Run the nginx Config Test

Once you have a rough idea of the problem area, test the full nginx configuration. This will list every syntax error across all config files Plesk has generated:

nginx -t

If the output says syntax is ok and test is successful, the problem isn’t a config syntax error — skip ahead to Step 5. If it throws errors, the output will tell you the exact file and line. That’s your target.

Step 3: Fix Configuration Errors in Plesk-Generated Files

Plesk generates nginx configs for each domain under /var/www/vhosts/system/<domain>/conf/. Don’t edit these directly — Plesk will overwrite them. Instead, use Plesk’s “Additional nginx directives” field in the panel, or fix the underlying issue through the UI.

If the error is in a file you manually created under /etc/nginx/conf.d/, open it and fix the syntax:

nano /etc/nginx/conf.d/your-custom-file.conf

Common syntax mistakes: missing semicolons at the end of directives, unclosed { } blocks, and invalid certificate file paths. After editing, always re-run nginx -t before attempting to start the service.

⚠ Warning: If nginx -t references a file under /var/www/vhosts/system/, don’t edit it manually. Go to Plesk > the affected domain > Apache & nginx Settings and remove or fix the custom directive from there. Editing Plesk-managed files directly gets overwritten on the next panel operation.

Step 4: Regenerate Plesk’s nginx Config

If the broken config file is a Plesk-generated one and you can’t pinpoint which domain caused it, the cleanest fix is to force Plesk to regenerate all nginx configuration files:

plesk repair web -domains-http-https -y

This command tells Plesk to rebuild the web server configuration for all domains. It usually takes 30–90 seconds on a server with dozens of domains. After it finishes, run nginx -t again before trying to start nginx.

📝 Note: The plesk repair web command is underused and genuinely useful. It fixes a lot of problems that aren’t obviously config-related, including missing include files after a Plesk update.

Step 5: Check for Port Conflicts

If the config test passes but nginx still won’t start, something else is probably listening on port 80 or 443. Check with:

ss -tlnp | grep -E ':80|:443'

If you see Apache (httpd) or another process holding those ports, that’s your conflict. In a standard Plesk setup, Apache runs on port 7080/7081 and nginx proxies to it — if Apache has somehow grabbed port 80, nginx can’t bind. You can fix the Apache port in Plesk under Tools & Settings > Apache Web Server, or temporarily stop Apache to confirm the conflict:

systemctl stop httpd   # CentOS/AlmaLinux
systemctl stop apache2 # Debian/Ubuntu
nginx -t && systemctl start nginx

Step 6: Check SSL Certificate File Paths

A surprisingly common cause of nginx failing to start is a missing or expired SSL certificate file. When a certificate is removed or a Let’s Encrypt renewal goes wrong, the nginx config still references the old file path — and nginx refuses to start at all if a referenced cert file doesn’t exist.

Check the error log output from Step 1 for lines like cannot load certificate or no such file or directory referencing a .pem or .crt file. The fix depends on whether it’s a Let’s Encrypt cert or a manually installed one:

  • Let’s Encrypt: Re-issue the certificate from Plesk > the affected domain > SSL/TLS Certificates > Let’s Encrypt
  • Custom cert: Re-upload the certificate and private key in Plesk > SSL/TLS Certificates

After re-issuing, Plesk will regenerate the nginx config automatically. Run nginx -t to confirm, then start nginx.

Step 7: Start nginx and Verify

Once the config test is clean:

systemctl start nginx
systemctl status nginx

If the status shows active (running), you’re done. Open a browser and test one of the affected domains. If nginx starts but sites still return errors, the issue may be with PHP-FPM or a domain-specific config — that’s a separate problem from nginx failing to start.

Common Issues & Troubleshooting

“[emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)”

Another process is holding port 80. Run ss -tlnp | grep :80 to identify it. On Plesk servers this is almost always Apache misconfigured to listen on port 80 instead of 7080. Fix the Apache port in Plesk or via /etc/httpd/conf/httpd.conf (AlmaLinux/CentOS) or /etc/apache2/ports.conf (Debian/Ubuntu), then restart Apache before starting nginx.

“[emerg] SSL_CTX_use_certificate_file() failed” or “no such file or directory” for a .pem file

The certificate file nginx is referencing doesn’t exist on disk. This usually happens after a failed Let’s Encrypt renewal or after manually removing a certificate without updating the nginx config. Re-issue the certificate from Plesk’s SSL/TLS panel for the affected domain. If the domain no longer exists in Plesk, manually remove the SSL block from the nginx config and run plesk repair web -y.

nginx -t passes, but systemctl start nginx still fails immediately

This one catches people off guard. A passing config test doesn’t always mean nginx will start — it only validates syntax. The actual failure might be a permissions problem on a socket file, a missing directory for logs, or an SELinux denial. Check with:

journalctl -u nginx -b --no-pager | tail -30
audit2why < /var/log/audit/audit.log | grep nginx   # if SELinux is enabled

On AlmaLinux 8/9 with SELinux enforcing, nginx is sometimes blocked from reading certificate files in non-standard paths. The fix is to restore the correct SELinux context on the cert directory or temporarily set SELinux to permissive while you investigate.

Plesk shows “Web server is not running” after nginx was manually restarted

Plesk monitors nginx via its own watchdog. If you start nginx outside of Plesk, the panel sometimes doesn’t register the change immediately. Give it 60 seconds and refresh. If it still shows the server as down despite nginx running, restart the Plesk monitoring service:

systemctl restart sw-engine
systemctl restart sw-cp-server

nginx Fails After a Plesk Update

Plesk updates occasionally modify or replace nginx include files, which can invalidate custom configurations. After any Plesk update where nginx stops working, run plesk repair web -domains-http-https -y first — it resolves the majority of post-update nginx failures. If you had custom configs in /etc/nginx/conf.d/, verify they’re still present and that their syntax still works with the updated nginx version.

FAQ

Frequently Asked Questions

How do I restart nginx in Plesk without breaking anything?

Always run nginx -t before restarting — it tests your config for syntax errors without touching the running server. If the test passes, run systemctl reload nginx for a graceful reload that doesn’t drop active connections, or systemctl restart nginx for a full restart. Avoid restarting nginx through the Plesk UI if you’ve made manual config changes, since Plesk may regenerate the config file during that process.

Can a single domain with a bad SSL certificate bring down all sites on the server?

Yes, and this is the gotcha most people don’t expect. Nginx loads its entire configuration at startup — if one domain’s SSL cert file is missing or unreadable, nginx refuses to start and every site on the server goes offline. When you get a server-wide outage after renewing or removing a single certificate, start by checking the nginx error log for SSL-related errors referencing that domain’s config file.

What's the difference between nginx -t passing and nginx actually starting?

nginx -t only validates configuration file syntax — it doesn’t attempt to bind ports or read certificate files in all cases. A config can pass the test and still fail to start due to port conflicts, SELinux denials, or file permission issues. Always check journalctl -u nginx -b if nginx won’t start despite a clean config test.

Should I edit nginx config files directly on a Plesk server?

Files under /var/www/vhosts/system/ are managed by Plesk and will be overwritten any time you make a change through the panel. Use the ‘Additional nginx directives’ field in Plesk’s Apache & nginx Settings for domain-level customisations. For server-wide custom config, create a file under /etc/nginx/conf.d/ — Plesk won’t touch files there, but you own the maintenance of them.

How do I find out which domain caused nginx to fail?

Run nginx -t — it will output the exact file path and line number where the error is. The file path will usually contain the domain name (e.g. /var/www/vhosts/system/example.com/conf/nginx.conf), which tells you exactly which domain to investigate in Plesk. If the path isn’t obvious, grep the config directory: grep -r 'ssl_certificate' /etc/nginx/ | grep 'example.com'.

SHARE THIS ARTICLE

Need help with your hosting?

Host & Tech provides 24/7 support for all VPS, dedicated, and shared hosting customers.

Scroll to Top