What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
An Nginx location block can be valid and still return 404 because a different server or location handled the request, the URI mapped to the wrong filesystem path, a directory had no index file, try_files deliberately ended with =404, or an application/Ingress route was never reached. Fix the specific stage that fails: identify the selected server and location, calculate the path Nginx tested, then verify index, fallback, and upstream behavior.
Start by identifying where the 404 is generated
A 404 does not by itself prove that Nginx could not find a local file. It may come from Nginx’s static-file handler, an explicit directive such as try_files ... =404, an upstream application, or an Ingress route. Treat the response as a symptom and determine which request-processing stage produced it.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →- Nginx-generated static 404: the selected location tried a calculated path that does not exist, or a directory had no usable index.
- Intentional configuration 404:
try_filesexhausted its candidates and reached=404. - Upstream 404: a proxied application received the request and returned its own not-found response.
- Ingress 404: the Kubernetes Ingress rules did not declare a child path that matches the request.
Use the exact request URI, including whether it ends in a slash, and the actual Host, port, and TLS endpoint. A request for /app is not interchangeable with /app/; the two can select different behavior. Slash-terminated prefix locations also receive special redirect handling when proxying, so test both forms.
1. Confirm the server and location that actually match
Nginx first chooses a server block using the listening address and port, TLS configuration, and the request’s Host header. It then evaluates the URI against that server’s locations. Editing a block in the wrong virtual host cannot change the response.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
Understand location precedence
Location selection has several competing forms:
location = /healthis an exact match for one URI.- A plain prefix such as
location /app/matches any URI beginning with that prefix. - The longest matching prefix is selected provisionally.
- Regular-expression locations (
~or~*) can override that prefix when they match. - If the longest prefix uses
^~, Nginx does not test regular-expression locations after selecting it.
Consequently, a broad regex can capture a request you expected to reach a more specific-looking prefix. Conversely, a ^~ prefix can intentionally keep regex handlers out of a subtree. An exact match is useful when one URI must never fall through to a general handler.
server {
listen 80;
server_name example.com;
location / {
try_files $uri $uri/ =404;
}
location ~ .php$ {
# A regex location can take precedence over the prefix above.
# Configure the appropriate application pass directive here.
}
}
Inspect the effective configuration rather than only the file you think Nginx reads:
sudo nginx -t
sudo nginx -T
nginx -t validates syntax and referenced files. nginx -T prints the complete loaded configuration, including included files, so you can find duplicate server_name declarations, another location, or an unexpected default server. After a successful change, reload Nginx with the service manager used by your system and test the intended host explicitly:
curl -i -H 'Host: example.com' http://127.0.0.1/app
curl -i -H 'Host: example.com' http://127.0.0.1/app/
For HTTPS, test the TLS listener and preserve the hostname during certificate negotiation, for example with the appropriate curl URL and, when diagnosing a local endpoint, its --resolve option. This prevents a request from silently landing in another virtual host.
2. Calculate the URI-to-disk path
Once you know the selected location, write down the path Nginx will test. With root, Nginx appends the complete request URI to the root directory.
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
location /assets/ {
root /var/www/site;
}
For /assets/app.css, the resulting path is:
/var/www/site/assets/app.css
If the file is actually at /var/www/site/app.css, the configuration is not looking in the directory you intended. Correct the directory layout or use an alias-style mapping that replaces the location prefix.
Free tools Windows power users keep installed
One-click scans. No signup required.
location /assets/ {
alias /var/www/site/;
}
With that mapping, /assets/app.css maps to /var/www/site/app.css. Keep the location and alias slashes consistent, and calculate a sample request by hand before changing several directives. An alias is a mapping of the matched location portion; a root is a base directory to which the URI is appended. Confusing those two models is a common reason that a syntactically valid block returns 404.
Check the file after the calculation
- Verify that the file exists at the exact calculated path.
- Check case: Linux filesystems normally distinguish
App.cssfromapp.css. - Check directory traversal permissions for the Nginx worker user, not only the file’s read bit.
- Confirm that a symlink target exists and is accessible if the path uses symlinks.
- Check that a deployment did not place the files in a release directory different from the configured root.
Do not use permissions as the first explanation. First prove which location won and which path it calculated; then inspect ownership, modes, and security controls on that path.
3. Handle directory requests and index files
A URI ending in / is treated as a directory request. Nginx checks the filename configured by the index directive; the documented example normally uses index.html. If that file is not present at the mapped directory, Nginx returns HTTP 404 by default.
location /docs/ {
root /var/www/site;
index index.html;
}
A request for /docs/ therefore requires:
/var/www/site/docs/index.html
If the directory contains no configured index, choose an intentional behavior:
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
- Add the expected index file at the calculated location.
- Point
indexat the application’s actual entry file. - Use an application fallback when this URL belongs to a front controller.
- Enable
autoindexonly when exposing a directory listing is deliberate and acceptable.
Check this separately from location matching. A correctly selected location can still produce a 404 solely because its directory has no index.
4. Audit every candidate in try_files
try_files is an ordered existence test. Nginx checks each candidate in sequence using the current root or alias mapping. The final parameter is not another file test when it is a status code, URI, or named location; it is the action taken after all earlier candidates fail.
location / {
try_files $uri $uri/ =404;
}
This configuration checks a file for the request URI, then a directory, and deliberately returns 404 if neither exists. That is correct for a strictly static site and wrong for an application whose routes do not correspond to files.
Use a real fallback for a single-page application
location / {
try_files $uri $uri/ /index.html;
}
Here, an unknown client-side route is internally redirected to /index.html. Ensure that the fallback file exists under the same mapping and that the new URI is handled by a location. If the fallback itself can enter the same failing rule, you may create an internal redirect loop; test a missing asset and a client-side route separately.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsSend misses to an application upstream
location / {
try_files $uri $uri/ @backend;
}
location @backend {
proxy_pass http://backend.example.com;
}
The named location gives the application a chance to resolve routes that are not local files. To pass a request to an HTTP proxied server, Nginx requires proxy_pass inside a location (including a named location). Confirm that the upstream hostname, port, scheme, and application route are correct, and distinguish an upstream-generated 404 from Nginx’s own response in the logs.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Do not hide an accidental 404 behind a broad rule
A catch-all location / containing try_files ... =404 can intercept API or application URLs before they reach the backend. Narrow the static location, add a more specific proxied location, or replace the terminal status with the intended URI or named fallback. Keep the ordering and precedence rules in mind: a new block helps only if it actually wins for the request.
5. Separate static files from application routes
Static and dynamic requests have different success criteria. A static location must map to an existing file or directory. An application location must hand the request to the application server using proxy_pass or the appropriate FastCGI, uWSGI, or gRPC pass directive.
| Symptom | What to inspect | Typical remedy |
|---|---|---|
| Only static assets should be served, but files 404 | Winning location, root/alias calculation, file existence, permissions, and case | Correct the mapping or deployment path; verify the worker can traverse and read it |
| Application route returns Nginx 404 | Whether a broad static block runs try_files ... =404 |
Add a specific upstream location or use a named fallback |
| Application route returns a framework’s 404 page | Upstream access and the route received by the app | Inspect proxy URI handling and the application’s route configuration |
| Only directory URLs fail | Configured index filename and directory contents |
Add or correctly map the index, or configure an intentional fallback |
Keep static handling narrow when possible. For example, put assets under /assets/ with a verified mapping and let the application own its route namespace. This reduces the chance that a file-existence test consumes a URL that should have gone upstream.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →6. Check trailing-slash behavior explicitly
Test both /app and /app/. A slash can change prefix matching, directory handling, index lookup, and proxy behavior. A location written as location /app/ does not match /app in the same way as the slash-terminated form, and Nginx may issue a redirect for the canonical slash form in proxy configurations.
curl -i -H 'Host: example.com' http://127.0.0.1/app
curl -i -H 'Host: example.com' http://127.0.0.1/app/
Follow redirects only after inspecting the first response. A 301 or 302 can reveal the canonical URI; the response after the redirect may then expose the actual 404. Make the desired canonical form explicit and ensure that the location, index, and upstream route all agree on it.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
7. Diagnose Nginx Ingress parent and child paths
Kubernetes Nginx Ingress adds another matching layer. A parent path can look like it matches while no declared child route handles the requested URI. The documented example uses a parent such as /static/ with child paths for /static/css/ and /static/js/; a request for /static/fonts/bold.woff can still return 404 when that fonts subroute is absent.
Review the rendered Ingress rules and verify that every required subtree is declared. Keep each child’s path type compatible with its parent. In the documented model, a ^~ parent requires compatible ^~ subroutes; mixing incompatible path types can leave an apparently covered URI without a usable handler.
- Confirm the request’s host reaches the intended Ingress resource and controller.
- Inspect the exact path and whether it ends with a slash.
- Declare missing child paths rather than assuming the parent covers every descendant.
- Check that the generated Nginx configuration contains the expected location and backend.
- Distinguish an Ingress default-backend 404 from a 404 returned by the service behind it.
8. Use logs and a minimal request test
When behavior is unexpected, inspect both access and error logs. The access log confirms the request URI, host, method, status, and often the upstream status. The error log can show the filesystem path Nginx attempted to open, an internal redirect problem, permission failures, or an upstream error.
sudo tail -f /var/log/nginx/access.log /var/log/nginx/error.log
In another terminal, issue one request at a time:
curl -i -H 'Host: example.com' http://127.0.0.1/assets/app.css
curl -i -H 'Host: example.com' http://127.0.0.1/app
curl -i -H 'Host: example.com' http://127.0.0.1/app/
Record the status, Location header, response body signature, and timing. A body generated by your application differs from Nginx’s standard error page and helps identify the producer. If proxying is involved, include upstream status and address in a temporary or existing log format so you can see whether the backend was contacted.
After editing, always validate before reloading:
- Run
sudo nginx -tand correct every reported error. - Use
sudo nginx -Tto verify that the intended server and location are loaded. - Reload Nginx through your system’s service command.
- Repeat the minimal curl tests with the exact host and both slash variants.
- Read the corresponding access and error-log lines before trying another change.
Common 404 patterns and the shortest safe fix
| Observed pattern | Likely failure point | Fix direction |
|---|---|---|
| Every URL goes to the same unexpected page | Wrong server block, default host, port, or TLS listener | Test with the correct Host; inspect server_name, listen directives, and nginx -T |
| Only one prefix returns 404 while others work | More-specific prefix or regex captured it | Review exact/longest-prefix/regex precedence and use ^~ only when appropriate |
| Asset URL includes its directory twice | root appended the URI where an alias-style map was intended |
Calculate the path; correct root, alias, or file placement |
/folder/ fails but a file below it works |
Missing configured index | Check index and the mapped directory |
| Unknown SPA routes return a plain Nginx 404 | Terminal =404 in try_files |
Use the actual front-controller fallback and ensure it exists |
| API route never appears in application logs | Static catch-all intercepted it | Add a winning proxied location or named upstream fallback |
| Backend logs show the request and return 404 | Application route or proxy URI mismatch | Inspect the URI sent upstream and the app’s route definitions |
| Ingress serves some children but not another | Undeclared or incompatible child path | Add the required subroute with a compatible path type |
A repeatable decision checklist
- Freeze the request: note scheme, host, port, method, exact URI, query string, and trailing slash.
- Prove the server: use an explicit host header and inspect the loaded virtual-host configuration.
- Prove the location: account for exact, longest-prefix, regex, and
^~precedence. - Calculate the target: apply the root or alias rule to the URI and write down the resulting file or directory path.
- Check the target: verify existence, case, symlinks, and worker-user permissions.
- Check directories: confirm the configured index file exists when the URI ends in
/. - Read
try_filesleft to right: identify whether its final action is=404, a fallback URI, or a named location. - Confirm handoff: static content needs a file; application routes need the relevant upstream pass directive.
- For Ingress: verify every required child path and path-type compatibility.
- Validate and retest: run
nginx -t, reload, issue minimal curl requests, and correlate the log lines.
This sequence prevents the common mistake of changing root when the request never reached that block, or replacing a deliberate =404 when the correct solution is an application fallback.
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.

