If Nginx shows its welcome page or a different Django site, the request is reaching the wrong configuration at one of two boundaries: Nginx selected the wrong virtual server, or that server forwarded the request to the wrong Gunicorn process. Fix both boundaries by inspecting the loaded Nginx configuration, matching the real Host name in server_name, disabling a competing default site, and making the systemd Gunicorn unit and Nginx proxy_pass use the same project and endpoint.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
The procedure below isolates each layer so you can tell whether the failure is DNS/Host routing, Nginx configuration, Gunicorn startup, Unix-socket permissions, or Django itself.
As an Amazon Associate I earn from qualifying purchases.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Understand where the wrong page is coming from
A browser request passes through Nginx before it reaches Django. Nginx first chooses a server {} block using the listening address and port, then the HTTP Host header. If the host does not match any declared server_name, Nginx sends the request to the default server for that port. When no block is explicitly marked default_server, the first server loaded for the port becomes the default. That is why an otherwise correct Django configuration can still produce the distribution’s welcome page.
After selecting a server block, Nginx either serves a file from its root or forwards the request with proxy_pass. A correct virtual server can therefore display the wrong application if its proxy points to another socket or TCP port. Conversely, the correct proxy endpoint can still run the wrong project if Gunicorn was started with the wrong working directory, virtual environment, settings module, or WSGI module.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
What the common symptoms indicate
| Symptom | Most likely boundary | First checks |
|---|---|---|
| Nginx welcome page | Nginx virtual-server selection | server_name, listen port, Host header, and enabled-site links |
| A different Django project loads | Gunicorn process or service unit | WorkingDirectory, ExecStart, WSGI module, virtualenv, and settings |
| 502 Bad Gateway | Nginx-to-Gunicorn connection | Gunicorn status, socket or port, and socket permissions |
| Static files resemble the default site | Nginx file handling | The selected block’s root, alias, and static location |
| Domain works but the server IP shows a default page | Host-name mismatch | The IP request’s Host header and whether the IP is intentionally listed |
Inspect the configuration Nginx is actually loading
Editing a file does nothing if that file is not included. Start with the effective configuration rather than guessing which file Nginx reads.
- Validate syntax and print the complete loaded configuration:
sudo nginx -t sudo nginx -Tnginx -Texpands included files and shows everyserver {}block. Search that output for your domain, the public listen port,default_server,proxy_pass, and the packaged welcome-page root. - On distributions that use the sites-available/sites-enabled layout, inspect the enabled links:
ls -la /etc/nginx/sites-enabled/ ls -la /etc/nginx/sites-available/Follow each symlink and confirm the intended file is enabled. A correctly written file in
sites-availableis inactive until it is included, commonly through a link insites-enabled. - Identify every block listening on the public port, commonly port 80 for HTTP and 443 for HTTPS. Look for a packaged block whose
rootpoints to a welcome-page directory or whoselistenline claims the port asdefault_server.
Do not rely on the browser address bar while diagnosing. A cached page, an HTTP-to-HTTPS redirect, or a different DNS record can hide which request Nginx received. Test the local listener with an explicit Host header after the server block is corrected.
Recommended Free Tools
Make the intended virtual server win
Declare the real names and port
Your production block must listen on the port reached by the client and list every hostname you expect to serve. Include the bare domain and its www alias when both are valid. For an illustrative domain, the essential routing looks like this:
server {
listen 80;
server_name example.com www.example.com;
location / {
include proxy_params;
proxy_pass http://127.0.0.1:8000;
}
}
The names are compared with the request’s Host header. A request for an IP address does not match example.com; it will fall through to the port’s default server unless you deliberately add the IP as a name or create a separate behavior for unmatched hosts. Use the domain name when testing the site that is intended to be name-based.
Disable a competing packaged site
If the distribution’s default site listens on the same address and port, remove its enabled link or replace it with a deliberate catch-all. On a sites-available/sites-enabled system, a typical removal is:
sudo rm /etc/nginx/sites-enabled/default
sudo nginx -t
sudo systemctl reload nginx
The exact filename can differ, so remove only the link that nginx -T confirms is the packaged default. Deleting a file without checking the include layout can leave the active configuration unchanged.
Free tools Windows power users keep installed
One-click scans. No signup required.
You may keep an explicit catch-all server when you want unmatched hosts rejected or redirected. Put it on the same port and mark it intentionally:
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
server {
listen 80 default_server;
server_name _;
return 444;
}
Do not mark the Django block as the default merely to hide a name mismatch. That can make accidental requests appear to work while leaving DNS, aliases, or host-header errors unresolved. Make the requested names match instead.
Reload only after a successful syntax test
Use a reload to apply a valid configuration without stopping existing workers:
sudo nginx -t
sudo systemctl reload nginx
If nginx -t reports an error, fix that error before reloading. A failed test leaves the previously valid configuration in place, which can make it seem as though an edit was ignored.
Point proxy_pass at the exact Gunicorn endpoint
Nginx and Gunicorn must agree on one endpoint. The endpoint can be a Unix-domain socket or a loopback TCP address; it cannot be merely the directory containing the socket or an approximate port.
Unix socket configuration
A Unix socket avoids exposing an application port on the network, but Nginx needs permission to traverse the socket’s directory and connect to the socket file. A location using a socket can be written as:
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn/myproject.sock:;
}
The final colon separates the socket path from the optional URI portion in Nginx’s Unix-socket syntax. Use the exact path created by the Gunicorn service. If the service creates /run/gunicorn/myproject.sock while Nginx points to /run/gunicorn/site.sock, every application request will fail even though Gunicorn is healthy.
Loopback TCP configuration
For a TCP bind, the address and port must be identical in the systemd unit and Nginx:
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
location / {
include proxy_params;
proxy_pass http://127.0.0.1:8000;
}
Gunicorn should bind to the same loopback address and port, for example --bind 127.0.0.1:8000. A service bound to port 8001 or to a different address is a different endpoint. Check the listener instead of inferring it from an old configuration:
sudo ss -ltnp | grep gunicorn
sudo ss -lx | grep gunicorn
The first command helps find TCP listeners; the second lists Unix sockets. Match the result to proxy_pass character for character.
Audit the systemd Gunicorn unit
The systemd unit is the source of truth for the process that survives reboots. Open the actual unit and any drop-in overrides:
sudo systemctl cat myproject.service
sudo systemctl status myproject.service --no-pager
Replace myproject.service with the unit that your server uses. Verify all of the following fields in the loaded unit:
- WorkingDirectory: the directory containing the intended project’s
manage.pyand importable project package. - ExecStart: the Gunicorn executable inside the intended virtual environment, not a system-wide executable from another installation.
- WSGI module: the project package followed by
.wsgi, commonly with:applicationwhen using an explicit callable. - DJANGO_SETTINGS_MODULE: set it to the settings module for this project when the package does not provide it implicitly.
- Endpoint argument: the Unix socket path or TCP bind must match Nginx.
- User and group: the account must be able to read the project and virtual environment and write the socket directory.
- Python path options: a
--pythonpathvalue must point to the directory that contains the project package, not to the package directory itself unless that is how the import path is arranged.
A representative unit is:
[Unit]
Description=Gunicorn for myproject
After=network.target
[Service]
User=django
Group=www-data
WorkingDirectory=/srv/myproject
Environment=DJANGO_SETTINGS_MODULE=myproject.settings
ExecStart=/srv/myproject/venv/bin/gunicorn
--workers 3
--bind unix:/run/gunicorn/myproject.sock
myproject.wsgi:application
[Install]
WantedBy=multi-user.target
The names and paths in this example are illustrative; use the values that exist on your server. If the socket directory is created at boot by systemd, configure its runtime directory and ownership consistently with the Nginx worker account. A socket can exist while still producing 502 if Nginx cannot traverse its parent directory or read the socket permissions.
After changing a unit, make systemd reread it, restart the service, and inspect the journal:
sudo systemctl daemon-reload
sudo systemctl restart myproject.service
sudo systemctl status myproject.service --no-pager
sudo journalctl -u myproject.service -n 100 --no-pager
Start Gunicorn with the intended Django project
Gunicorn’s Django convention is to run a module such as gunicorn myproject.wsgi from the directory that contains manage.py. Gunicorn’s running documentation describes that directory as the simplest way to ensure the project can be imported. In a service, WorkingDirectory provides the same context; the module name still has to identify the correct package.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Check imports manually
Run the virtual environment’s executable as the service user or as an administrator for diagnosis:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
cd /srv/myproject
/srv/myproject/venv/bin/python manage.py check
/srv/myproject/venv/bin/gunicorn --check-config myproject.wsgi:application
/srv/myproject/venv/bin/gunicorn --print-config myproject.wsgi:application
manage.py check catches Django configuration and import problems. Gunicorn’s --check-config validates the application configuration and exits with a failure when it cannot load it. --print-config displays the resolved Gunicorn settings, including the bind value and other options after configuration files and command-line arguments are applied. Run these commands from the same working directory and virtual environment named in the unit; running them from another installation can produce a false sense of success.
Recognize a wrong-project launch
If the response is a different Django site rather than an error, inspect the module and path before changing Nginx. Common causes include a copied unit that still says oldproject.wsgi, a WorkingDirectory left at another deployment, a virtual environment containing a different checkout, or a stale DJANGO_SETTINGS_MODULE. A --pythonpath option can also make Python import a package from an unexpected directory.
Stop duplicate Gunicorn processes while diagnosing. If an old process owns the endpoint and the new systemd unit binds elsewhere, Nginx will continue to show the old application. The service status and process list should identify the owner of the socket or port:
ps -ef | grep '[g]unicorn'
sudo lsof -nP -U | grep myproject.sock
sudo lsof -nP -iTCP:8000 -sTCP:LISTEN
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Test each layer with an explicit Host header
Layered tests prevent you from treating an Nginx routing problem as a Django problem.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →- Test Django through Gunicorn directly. For a TCP endpoint, bypass Nginx:
curl -i -H 'Host: example.com' http://127.0.0.1:8000/For a Unix socket, use the socket explicitly:
curl --unix-socket /run/gunicorn/myproject.sock -i -H 'Host: example.com' http://localhost/A Django response proves that Gunicorn can import and run the project. A connection refusal, missing socket, or startup traceback belongs to the service layer.
- Test Nginx locally with the intended name. Send the Host header to the local HTTP listener:
curl -i -H 'Host: example.com' http://127.0.0.1/If this returns the right site but the public domain does not, inspect DNS, the TLS listener, redirects, or an upstream proxy. If it returns the welcome page, Nginx selected another block.
- Test the public name.
curl -i http://example.com/Compare the response headers and body with the local test. For HTTPS, test the HTTPS server block separately; a correct HTTP block does not automatically configure the TLS block.
- Test an unmatched name deliberately. Send a different Host header and observe the catch-all behavior. This confirms which block is the default and prevents an accidental default from being mistaken for your Django site.
Use Nginx’s error log and the Gunicorn journal at the same time. A request that appears in neither log may be reaching a different machine or listener. A request in Nginx’s access log but not in the Gunicorn journal indicates a static-file route, a different proxy target, or a connection failure before application logging.
Serve static files without creating a second default site
Static assets should have an intentional route in the same server block that handles the domain. Nginx’s Django deployment guidance separates static-file handling from application forwarding: Nginx can serve collected files directly while sending dynamic URLs to Gunicorn.
Best Value
server {
listen 80;
server_name example.com www.example.com;
location /static/ {
alias /srv/myproject/staticfiles/;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn/myproject.sock:;
}
}
Use the actual directory produced by your deployment’s static-file collection command. The trailing slash on an alias matters because Nginx maps the location prefix to that directory. Do not point the selected server’s root at a distribution welcome-page directory and expect Django to replace it; requests that match that file route will never reach Gunicorn.
If only static URLs show the wrong branding while dynamic pages are correct, inspect the selected block’s root, alias, and location precedence. Also confirm that the browser is not loading assets from an old hostname or cache.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Compare Unix sockets and loopback TCP before changing the design
Either endpoint type works. Choose one deliberately and keep its ownership, service unit, and Nginx configuration aligned.
| Factor | Unix socket | Loopback TCP |
|---|---|---|
| Endpoint in Nginx | A path such as /run/gunicorn/myproject.sock |
An address and port such as 127.0.0.1:8000 |
| Gunicorn argument | --bind unix:/run/gunicorn/myproject.sock |
--bind 127.0.0.1:8000 |
| Typical failure | Missing socket, wrong path, or Nginx permission denied | Wrong port, stale process, or listener bound to another address |
| What to inspect | ss -lx, parent-directory permissions, service runtime directory |
ss -ltnp, process owner, and port conflicts |
| Network exposure | Local filesystem endpoint | Keep the bind on loopback unless external access is intentional |
Changing from one type to the other is not a fix by itself. It is useful when the existing endpoint is mismanaged, but the new bind must be changed in both the systemd unit and Nginx and then verified with a direct request.
Failure branches and precise fixes
The Nginx welcome page remains
- Run
nginx -Tand locate the block that contains the welcome-pageroot. - Check that the intended block listens on the same port and address as the request.
- Confirm the requested hostname, including a
wwwprefix, appears inserver_name. - Remove or change the enabled packaged default only after identifying it in the loaded configuration.
- Run
nginx -tand reload; an untested edit is not active.
The wrong Django project appears
- Use
systemctl catto inspect the unit and drop-ins, not just an editor view of a possibly unused file. - Match
WorkingDirectoryto the directory containing the intendedmanage.py. - Match the virtualenv executable, WSGI module, settings module, and any
--pythonpath. - Check for another Gunicorn process owning the endpoint.
- Restart the corrected unit and read its journal for the imported module and startup errors.
Nginx returns 502 Bad Gateway
- Confirm the Gunicorn unit is active and did not exit during Django startup.
- Compare the exact socket path or TCP address in
ExecStartwithproxy_pass. - For a socket, verify that Nginx’s worker user can traverse every parent directory and access the socket.
- For TCP, verify that the expected process is listening on the expected port and that no stale process owns it.
- Read Nginx’s error log and the Gunicorn journal together; their timestamps usually distinguish a refused connection from an application exception.
The domain works but the IP address shows the default
An IP request carries the IP as its Host value, not the domain. That value will not match a domain-only server_name. Include the IP deliberately if it is a supported access path, or use the domain name for testing. Do not infer a DNS or application failure from an intentionally unmatched IP request.
Only static files are wrong
- Verify that the request selected the intended server block rather than a different block with another
root. - Check the static location’s path,
aliasspelling, and trailing slash. - Confirm the collected files belong to this deployment and that the browser is requesting the expected hostname.
A repeatable repair order
Use this order whenever several projects share one server:
- Record the public hostname, HTTP or HTTPS port, and the expected Django project directory.
- Print Nginx’s loaded configuration and list enabled site links.
- Make one server block own the intended names and route dynamic requests to the chosen Gunicorn endpoint.
- Disable a competing packaged default or define a conscious catch-all for unmatched hosts.
- Inspect the Gunicorn systemd unit for working directory, executable, module, settings, user, group, and bind.
- Run Django’s check and Gunicorn’s
--check-configand--print-configfrom the unit’s working directory and virtual environment. - Restart Gunicorn, verify its socket or port, test it directly, then test Nginx with an explicit Host header.
- Run
nginx -t, reload Nginx, and test the real domain over the protocol users will access.
This sequence gives each symptom one owner: a default page is resolved in Nginx selection, a wrong project in Gunicorn’s launch context, a 502 at the endpoint or permissions boundary, and incorrect assets in the selected static route.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

