If every Nginx virtual host starts returning 404 and a reboot temporarily restores them, the reboot is clearing a shared runtime, configuration, mount, or upstream condition. It is not the repair. Identify whether Nginx or an upstream application generated the response, validate the complete configuration, check virtual-host and file mapping, then reload only after a successful test. Finally, correct startup ordering or dependencies so the fault cannot return.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Why a reboot appears to fix every site
Nginx uses a master process and worker processes. Configuration changes are applied by reloading the master, which starts new workers with the tested configuration and lets old workers finish existing connections. A reboot destroys all processes and starts them again, so it can clear stale workers, restore a mount, recreate a socket, reorder dependent services, or cause generated configuration to be created before Nginx starts.
As an Amazon Associate I earn from qualifying purchases.
Free tools Windows power users keep installed
One-click scans. No signup required.
That behavior narrows the search to components shared by the affected sites:
- the configuration file and its included virtual-host files;
- master and worker process state, including a stale PID or an unsuccessful reload;
- server-block selection for HTTP and HTTPS;
- a document-root filesystem, bind mount, or generated release directory;
- a common proxied application, socket, DNS name, or service dependency.
If a reboot helps only temporarily, record what changes after the system has been running: mounts, generated files, upstream services, certificate renewals, deployment symlinks, and Nginx reloads. The timing often distinguishes a startup-order problem from a configuration mistake.
#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.
First prove who generated the 404
A 404 in the browser is not enough to identify the failing layer. Nginx can return 404 because a local file does not exist, while a proxied application can return its own 404 through Nginx. Treat those as different incidents.
Capture the response and request details
Run a request against the affected hostname and save the complete headers and body. For HTTPS on a local machine, this example preserves the hostname while targeting loopback:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →curl -k -i --resolve example.com:443:127.0.0.1 https://example.com/
For plain HTTP, use the Host header explicitly:
curl -i -H 'Host: example.com' http://127.0.0.1/
Compare a failing site with a site that still works, if any. Look for the Server header, redirects, an application-specific JSON or HTML body, and whether the response changes when you request a known static file. Headers are clues, not proof; the logs provide the authoritative correlation.
Correlate access and error logs
Find the paths configured by the active access_log and error_log directives. On a system using the usual service layout, recent entries can be viewed with:
sudo tail -f /var/log/nginx/access.log /var/log/nginx/error.log
Then make one request and note its timestamp, host, URI, status, and upstream fields. A log entry with an upstream status such as 404 indicates that the proxied server supplied a status. A local-file failure commonly appears with an open or stat error for the mapped path. If your log format does not include upstream fields, temporarily use the effective configuration or inspect the application log while making the request.
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.
Also check the service journal, because syntax, permission, PID, and startup failures may never appear in the site log:
sudo journalctl -u nginx --since '15 minutes ago'
Use the running service’s configuration, not an assumed one
Check process and service arguments
Before testing, establish which binary, configuration path, prefix, and PID file the service actually uses:
ps -ef | grep '[n]ginx'
systemctl cat nginx
systemctl show nginx -p ExecStart -p PIDFile -p FragmentPath
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Distribution packages commonly use /etc/nginx/nginx.conf, but a custom unit, container, or control panel may pass -c or -p options. Editing one configuration while the service reads another produces apparently random results.
Test syntax and inspect the full effective configuration
Run the test with the same options shown by the service unit. A standard installation can be checked with:
sudo nginx -t
If the unit uses a custom file or prefix, include them, for example:
sudo nginx -t -c /path/to/nginx.conf -p /path/to/prefix/
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
A successful syntax test checks more than spelling: it confirms that included files can be read and that directives are valid for the installed Nginx build. It does not prove that the intended server block will match a request or that a root directory exists.
Use the configuration dump to see what Nginx will actually load:
sudo nginx -T
Search that output for every affected hostname, listen directive, root, alias, try_files, proxy_pass, and include. This exposes duplicate server names, an omitted symlink, an include directory that is different from the one you edited, and a later directive overriding an earlier assumption.
Verify virtual-host selection
Nginx selects a server block using the local address and port, the Host header for HTTP, and the SNI name for HTTPS. If no name matches, it uses the default server for that address and port. A shared default block can therefore make every hostname appear to return the same 404 even when individual site files are intact.
Check listeners and defaults
- Confirm that each expected site listens on the address and port receiving traffic, such as port 80 or 443.
- Check whether an unintended
default_serveris catching requests. - For HTTPS, verify that the certificate and server block contain the expected hostname and that the client sends the correct SNI name.
- Look for duplicate
server_namevalues in thenginx -Toutput; Nginx will choose one according to configuration order, not according to the file name you expect. - Confirm that all files or symlinks under directories such as
sites-enabled, or equivalent included directories, are present and readable by the service account.
Test each host while bypassing external DNS
Use curl --resolve for TLS or an explicit Host header for HTTP to send a request to the local listener. This separates Nginx server-block matching from a load balancer, CDN, or stale public DNS record. If the local request returns the correct site while the public request returns 404, investigate the layer in front of Nginx instead of changing roots.
Check URI-to-file mapping for static sites
For a static request, Nginx combines the selected root with the request URI. A request for /images/logo.svg under root /srv/example; maps to /srv/example/images/logo.svg. If that file is absent, the result is a local 404.
Inspect root, alias, index, and try_files
- root: Confirm that it points to the current release or document directory, not an old deployment path.
- alias: Check the replacement path and trailing-slash behavior. An alias maps the matching location differently from root, so a missing or extra path component can make every asset look absent.
- index: Verify that the directory contains the configured index file and that the request is allowed to resolve to it.
- try_files: Follow each candidate in order. A fallback such as
/index.htmlmust exist in the same effective root, and an internal redirect can select a different location.
Test the exact path on the server:
sudo ls -l /srv/example/index.html /srv/example/images/logo.svg
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.
Then verify every parent directory. The Nginx worker needs execute permission on each directory in the path, read permission on files, and access to any mounted filesystem. A file can exist yet still produce a 404 or a permission-related error when a parent directory is inaccessible. Check the error log for the precise path Nginx attempted to open rather than guessing from the URL.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsIf the document root is a symlink to a release directory, confirm that the link target still exists after deployment and reboot. A deployment that removes the old target before creating the new one can briefly or permanently expose an empty path to all virtual hosts sharing the same release mount.
Separate proxied 404s from local 404s
When the matching server block contains proxy_pass, fastcgi_pass, or another gateway directive, Nginx may be functioning correctly while the application returns 404. Do not repair a local root until the logs show that the request was handled locally.
Test the upstream directly
Identify the upstream address, port, or Unix socket from the effective configuration. For an HTTP upstream, make a direct request from the Nginx host:
curl -i http://127.0.0.1:8080/health
Use the same path and Host header that Nginx sends when necessary. For a Unix socket, use the client or application-specific health command that supports that socket. Compare the direct status and body with Nginx’s access-log upstream status.
PC 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 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute- If the upstream itself returns 404, inspect its routes, deployment version, base path, and working directory.
- If the upstream is unavailable, expect connection errors or gateway statuses rather than a genuine application 404; check its service log and socket ownership.
- If the upstream returns the correct content directly but Nginx returns 404, inspect
locationmatching andproxy_passURI rewriting. A trailing slash or a nested location can change the path sent upstream. - If every site proxies to one shared service, verify that service’s startup order, DNS resolution, and configuration generation.
Reload only after the test passes
NGINX documentation specifies that configuration changes take effect after a reload. The reload signal is SIGHUP, and the command-line form is:
sudo nginx -s reload
On a systemd-managed service, you can use:
sudo systemctl reload nginx
Use the same manager that owns the service so the correct PID and configuration are addressed. A successful command means the signal was sent; it does not replace reading the logs and making a real request.
Best Value
If parsing the new configuration fails, Nginx keeps the old workers serving traffic. That safety behavior can make it appear that a reload was ignored. Read the exact error before trying again:
sudo nginx -t
sudo journalctl -u nginx -b
Correct the reported include, permission, PID, syntax, certificate, or upstream-resolution problem, rerun the test, and reload again. Do not use a full stop-and-start as a substitute for a failed test: it can turn a recoverable configuration error into an outage.
Recommended Free Tools
Make the correction survive a reboot
Ensure document filesystems are mounted first
If roots live on a separate disk, network filesystem, encrypted volume, or bind mount, verify that it is mounted before Nginx starts. Check the mount table and the service’s boot journal, then confirm that the root and index files are present immediately after startup. Correct the mount definition or service dependency rather than adding a delayed manual reload.
Order upstream services and sockets
For proxied sites, enable the application service and ensure its socket or listening port is created before Nginx accepts traffic. A service that starts after Nginx may work after a later reload but fail on the initial boot path. Check service-manager status and logs for the first failing transaction.
Generate configuration before reload
If a deployment tool creates virtual-host files, certificates, symlinks, or an include fragment, confirm that generation completes before any automated Nginx reload. The reload hook should run the same nginx -t check used manually and abort on failure. Keep the generated files in the path used by the service, not merely in a working directory used by the deployment job.
Verify permissions and identities
Confirm the user configured by the Nginx user directive can traverse every parent directory and read the site files, certificates, and socket. A root-owned deployment can leave files readable only by the deployer, while a reboot changes which worker identity accesses them. Check access-control systems such as mandatory security policies if ordinary Unix permissions look correct.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Perform a controlled reboot test
- Record the effective configuration, active mounts, enabled services, and a known-good request before rebooting.
- Reboot during a maintenance window.
- Immediately check
systemctl status nginx, the service journal, mount status, and upstream service status. - Repeat the same
curlrequests and log correlation used before the reboot. - Leave the system running long enough to cross the interval when the 404 normally returns, then test again.
A fix is persistent only when the sites remain correct through startup, reload, deployment, and the normal recurrence interval.
Quick Recap
Choose the fix from evidence, not from the reboot result
| Observed evidence | Likely layer | Next action |
|---|---|---|
| Access log shows a local request and error log names a missing path | Root, alias, index, try_files, release link, mount, or permissions | Verify the mapped path and every parent directory, then correct the shared filesystem or location directive. |
| Access log includes an upstream 404 and the direct upstream returns the same body | Application route, deployment version, or upstream base path | Fix the application or its route; changing Nginx roots will not help. |
| All hostnames receive one default site’s 404 | Listen address, default server, Host header, SNI, or duplicate server names | Inspect nginx -T and test each hostname locally with the correct Host or SNI. |
| Reload reports an error and old behavior remains | Invalid include, permission, PID, certificate, or unresolved upstream | Read the exact test and journal error, correct it, then reload only after nginx -t succeeds. |
| Sites work after boot but fail when a mount, deployment, or upstream restarts | Startup ordering, transient mount, generated configuration, or dependency lifecycle | Repair service ordering and add health checks; do not schedule repeated reboots. |
Common mistakes that prolong the outage
- Restarting repeatedly: This erases evidence and can hide whether a reload, mount, or upstream restart was the real trigger.
- Testing only the browser: Browser caches, redirects, proxies, and custom error pages obscure the response source. Use a timestamped command-line request and logs.
- Editing an inactive file: The service may use a different
-cpath, prefix, container, or generated include directory. - Assuming every 404 is a permissions error: A missing file, wrong server block, or upstream route can produce the same status.
- Reloading without a configuration dump: Syntax can pass while the wrong virtual host, root, or location wins at runtime.
- Fixing a generated file by hand: The next deployment will overwrite it. Correct the generator or template and verify the resulting effective configuration.
A compact recovery runbook
- Capture one failing response with
curl -iand correlate its timestamp in access and error logs. - Determine whether the status is local or upstream; test the upstream directly when applicable.
- Inspect the service unit to identify the actual configuration, prefix, and PID.
- Run
nginx -twith those exact options, then inspectnginx -T. - Check listener, default-server, Host, SNI, and duplicate-name matching.
- For static content, verify
root,alias,index,try_files, mounts, symlinks, and directory traversal permissions. - For proxy content, compare the upstream status and path with Nginx’s response.
- Reload with
nginx -s reloador the service manager only after the test passes; read any error immediately. - Repair boot mounts, service ordering, generated includes, or permissions, then validate through a controlled reboot and the normal runtime interval.
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.




