Welcome to nginx! shown instead of my site Nginx / Apache Origin: Edge & web server OSI layer 7 · Application Last updated 5 Nov 2026

Browser: Welcome to nginx! If you see this page, the nginx web server is successfully installed and working

Requests are served by the default server block, not your site's block.

Exact message you may see Welcome to nginx!Welcome to nginx! If you see this page, the nginx web server is successfully installed and workingnginx default page shows instead of my siteThank you for using nginx. Welcome to nginx!Apache2 Ubuntu Default Page: It works
Seen on: Nginx Linux

Meaning

Your server block isn't enabled (sites-enabled symlink missing), server_name doesn't match the Host header, the config wasn't reloaded, or the default site still takes default_server. Check nginx -T | grep server_name, enable the site, remove default, reload.

Common causes

  • Site config not symlinked in sites-enabled
  • server_name doesn't match the domain
  • Config not reloaded
  • Default site marked default_server
  • DNS pointing elsewhere/other host

⚡ Quick fix

  1. sudo ln -s /etc/nginx/sites-available/app /etc/nginx/sites-enabled/
  2. Match server_name with the Host header
  3. nginx -t && systemctl reload nginx and remove the default site

Detailed fix by platform

Linux

  1. curl -sI -H "Host: example.com" http://127.0.0.1/ | head -3

How to diagnose

  1. Enabled — Symlink exists?
  2. Name — server_name matches?
  3. Reload — Done?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Edge & web server. Errors that are often confused with or caused by this one (click to open):

499 Client Closed Request / client prematurely closed connection — Nginx: [info] client prematurely closed connection while reading response header from upstream / access log status 499 (Nginx / Apache)499 Client Closed Req…AH00112: DocumentRoot does not exist — Apache: AH00112: Warning: DocumentRoot [/var/www/example.com/public_html] does not exist (Nginx / Apache)AH00112: DocumentRoot…could not build the server_names_hash, you should increase server_names_hash_bucket_size — Nginx: nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 64 (Nginx / Apache)could not build the s…directory index of "/var/www/" is forbidden — Nginx: [error] directory index of "/var/www/html/" is forbidden (403 Forbidden) (Nginx / Apache)directory index of "/…ModSecurity: Access denied with code 403 — Nginx/Apache: ModSecurity: Access denied with code 403 (phase 2). Matched "Operator GE matched 5 at TX:anomaly_score" (Nginx / Apache)ModSecurity: Access d…nginx: client intended to send too large body — Nginx: [error] client intended to send too large body: 5242880 bytes (413 Request Entity Too Large) (Nginx / Apache)nginx: client intende…nginx: conflicting server name ignored — Nginx: nginx: [warn] conflicting server name "example.com" on 0.0.0.0:80, ignored (Nginx / Apache)nginx: conflicting se…nginx: duplicate location — Nginx: nginx: [emerg] duplicate location "/" in /etc/nginx/sites-enabled/default:52 (Nginx / Apache)nginx: duplicate loca…Welcome t…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.