Free tools Windows power users keep installed
One-click scans. No signup required.
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.
To move an NGINX web root, copy the site files to the new directory, change the active server block’s root directive, check any location-specific overrides, validate the configuration, reload NGINX, and test both the home page and a nested URL. Keep the old directory until those tests pass so you can roll back quickly.
What changes when you move an NGINX web root?
NGINX maps a request to the filesystem by taking the configured root directory and appending the request URI. If the server block contains root /srv/my-site/html;, a request for /images/logo.png is normally looked up as /srv/my-site/html/images/logo.png. Moving the root therefore changes the base directory without changing the public URLs.
Recommended Free Tools
The change is usually limited to the server block, but a complete migration also requires checking more-specific location blocks, try_files rules, symlinks, directory traversal permissions, and any mandatory-access-control policy on the host. A second server block can also answer the request if its server_name is selected instead of the block you edited.
Before you start
Keep a rollback copy
Do not delete or rename the old document root at the beginning. Leave it intact until the new path serves the home page, a representative static asset, and an application route if the site has one. If the migration fails, restoring the previous root line and reloading NGINX gives you a fast rollback.
#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:Upgraded 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.
- Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.
Confirm the account and service
You need administrative access to create the destination, copy files, edit the server configuration, and reload the service. Make the change on the machine that actually runs NGINX. A reverse proxy or load balancer in front of this host can make a successful local change appear ineffective if traffic is going elsewhere.
Decide what must be preserved
For a live site, preserve ownership, permission modes, symbolic links, and extended attributes when those properties are part of your deployment or security model. Copying only the visible file contents can break links, private directories, or access controls even when the HTML itself is present.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Find the active NGINX configuration
Configuration paths differ between distribution packages, source builds, and operating systems. Do not assume that every installation uses the same file. Ask the binary where it was compiled to look for its configuration:
nginx -V 2>&1 | awk -F: '/configure arguments/ {print $2}'
Inspect the output for the compiled --conf-path. That path identifies the main configuration file. Follow its include directives to locate the server block that answers the site.
Ubuntu’s common layout
On Ubuntu package installations, the default site is commonly enabled from /etc/nginx/sites-enabled/default, while the editable file is in /etc/nginx/sites-available/. If your site uses a separate file, edit that file rather than changing an unrelated default block. The enabled entry may be a symbolic link, so verify which file it resolves to before editing.
Identify the server block that matters
Look for the block whose listen and server_name match the request you will test. A configuration can contain several virtual hosts, and the first block you find may not serve your domain. Note the current root, index, location, and try_files directives before making edits. This record makes both review and rollback easier.
Create the new directory and copy the site
Choose a destination
The new path can be under a location such as /srv, provided the NGINX worker account can traverse every parent directory and read the files it must serve. Ubuntu documentation demonstrates /srv/my-site/html as a valid web-root location.
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
sudo mkdir -p /srv/my-site/html
Copy the existing contents, not the parent directory itself
Copy the contents of the old root into the new root so that the URL-to-file relationship remains unchanged. The trailing . in this example means hidden files are included without creating an extra html directory inside the destination:
sudo cp -a /var/www/html/. /srv/my-site/html/
The archive mode preserves ordinary ownership, modes, timestamps, and symbolic links. If your site relies on extended attributes or other filesystem metadata, use a copy method and options that preserve those attributes on your system, then verify them before switching traffic.
Check the resulting layout
Confirm that the file previously served at / is now directly under the destination. For example, if the old path was /var/www/html/index.html, the new path should be /srv/my-site/html/index.html, not /srv/my-site/html/html/index.html. Check representative directories, uploads, generated files, and symlink targets as well.
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 →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Change the server block’s root
Edit the server block that serves the site and replace the old path. Keep the existing index directive and application handlers unless the application itself requires a change.
server {
listen 80;
server_name example.com www.example.com;
root /srv/my-site/html;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
}
Only the filesystem base changes in this example. A request for /about.html is mapped below /srv/my-site/html, while the public URL remains /about.html. Do not add a second slash, filename, or URI prefix to the root value unless your directory layout specifically requires it.
Preserve application behavior
Changing root does not automatically rewrite upstream settings, script handlers, redirects, or fallback routes. Leave those directives as they were while moving static files. If an application stores uploads, caches, or generated assets outside the document root, decide separately whether those paths should move; changing the web root alone does not relocate them.
Audit location blocks and try_files rules
A server-level root is not necessarily the final path used for every request. A more-specific location can define its own root or alias, overriding the server-level value for matching URIs. Review every location that handles assets, downloads, APIs, or application fallbacks.
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.
How try_files resolves paths
try_files checks candidate files and directories using the current root or alias. In the example below, NGINX checks for a file or directory under the new root and returns a 404 when neither exists:
location / {
try_files $uri $uri/ =404;
}
If the new directory does not contain the same relative structure as the old one, try_files can return 404 even though the server block itself is valid. Single-page applications are especially sensitive to fallback rules, so test a client-side route rather than only the home page.
Look for stale or intentional overrides
Search the active configuration for additional root, alias, and try_files directives. An asset location may intentionally point to a separate directory, while an old override may still point at the previous web root. Determine whether each exception is deliberate before changing it; replacing every path indiscriminately can break downloads or private content.
Root and alias are not interchangeable
Use root when the request URI should be appended to a base directory. Use alias when a location’s URI prefix should be replaced by a different filesystem path. The distinction matters during a move because changing one directive can alter the resulting path.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minute| Directive | URI-to-filesystem behavior | Typical use | Migration concern |
|---|---|---|---|
root /srv/my-site/html; |
Appends the complete request URI to the configured directory. | A whole site whose URL tree mirrors its directory tree. | Relative paths must exist below the new root. |
alias /srv/assets/; |
Replaces the matching location prefix with the alias path. | A location that exposes a directory under a different URL prefix. | Review prefix matching and trailing-slash behavior carefully. |
For example, with location /assets/ { alias /srv/assets/; }, the URI prefix is mapped according to the alias location rather than appended as a complete string. Alias locations require particular attention to trailing slashes and regular-expression locations. If you only intend to move the complete document root, leave an existing alias unchanged and audit it separately.
Fix ownership and permissions safely
Parent-directory traversal
NGINX must be able to traverse every parent directory in the path, not merely read the final file. A directory can contain world-readable files and still produce a 403 if one parent directory denies execute (traverse) permission to the worker account.
File readability
Files used for public responses must be readable by the NGINX worker account or by a group to which it belongs. Directories also need suitable traversal permission. Ubuntu’s baseline example uses:
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.
sudo chmod -R 755 /srv/my-site/html
This is a starting example, not a universal security policy. Adapt permissions to your deployment model. Private configuration, upload, and cache directories may need tighter modes, different ownership, or a separate location rule. Broadly granting read or write access can expose secrets or allow unwanted modification.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated 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 matchSymlinks and security policy
Check every symbolic link in the copied tree. A link can still point into the old location, to a missing mount, or to a directory that NGINX cannot traverse. A 403 can also result from a mandatory-access-control policy such as SELinux or AppArmor. The correct remediation depends on the distribution and policy profile; inspect the policy audit records rather than disabling protection or applying a generic command.
Validate and reload NGINX
Always test the complete configuration before reloading:
sudo nginx -t
Proceed only when the test reports a successful syntax check. If it identifies an unknown directive, missing file, duplicate setting, or permission problem, correct that issue first. A successful test confirms that NGINX can parse the configuration; it does not prove that every requested file exists or that the selected server block is the one you intended.
After a successful test, reload the service:
sudo systemctl reload nginx
A reload applies the new configuration without an intentional full stop. Use the equivalent service-manager command on systems that do not use systemd. Keep the old directory available while the new workers begin serving requests.
Verify the move with representative requests
Test the root URL
Request the site’s home page using the same hostname that clients use. A browser test confirms the rendered result, while a header request can quickly reveal the status code:
curl -I http://example.com/
Use HTTPS when that is how the site is normally accessed. A redirect to HTTPS is expected if the configuration enforces it; follow the redirect and verify the final response as well.
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.
Test a nested static asset
Choose a known stylesheet, image, JavaScript file, or download below a directory. This catches an incorrectly copied tree, an extra directory level, and a location-specific root that the home page does not exercise.
curl -I http://example.com/path/to/asset.css
Test an application route
If the site uses a front-controller or fallback route, request a representative path that is not a physical file. Confirm that the expected handler receives it and that try_files does not return a 404 prematurely. Test an upload or generated asset only if that workflow is part of the site’s normal operation.
Use access and error logs
When a response is wrong, inspect the NGINX access and error logs while repeating the request. The access log shows which URI and status code were recorded; the error log often reveals a missing file, denied permission, failed symlink target, or upstream problem. Log locations vary with the active configuration, so use the paths declared by your installation rather than assuming a fixed filename.
Troubleshoot common migration failures
403 Forbidden immediately after the move
- Confirm that the request is reaching the server block whose
rootyou changed. - Check execute permission on every parent directory and read permission on the requested file.
- Inspect symlink targets and ensure they are reachable from the NGINX worker account.
- Review mandatory-access-control denials for the new path.
- Read the error log while making a fresh request; its message usually distinguishes a filesystem denial from a configuration mismatch.
Do not solve a 403 by making the entire filesystem writable or by disabling security controls. Correct the ownership, mode, path labeling, or location rule that caused the denial.
The old content is still served
Check for a more-specific location with its own root or alias. Then verify the selected server_name and listen address. Another server block may be answering the hostname, or a stale deployment symlink may still point to the old directory. Confirm that the reload succeeded and that your test request reaches this host.
Static files return 404
Compare the requested URI with the actual relative path under the new root. An extra directory level during copying is common. Next, inspect try_files and any location override. If the URI is handled by an alias, its replacement semantics—not the server-level root—determine the filesystem path.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →The configuration test fails
Read the exact file and line reported by nginx -t. Typical causes include a missing semicolon, a misspelled path, an edit made to a disabled file, or a directive placed outside its permitted context. Restore the last known-good line if necessary, retest, and only reload after the check succeeds.
Only some domains changed
Each virtual host has its own server block and may have a different root. Update only the intended site, then test each hostname separately. A default server can make an unmatched hostname appear to work while the real domain still uses its previous configuration.
Rollback procedure
- Leave the new directory in place so no copied data is lost.
- Restore the previous
rootvalue in the active server block. - Run
sudo nginx -tand resolve any syntax error. - Run
sudo systemctl reload nginx. - Request the home page and a nested asset to confirm that the old path is serving again.
After the rollback, investigate logs and path differences before attempting another switch. Do not remove the old directory until the new location has passed the same tests and any deployment jobs, backups, or scheduled tasks have been updated.
Quick Recap
Migration checklist
- Identify the compiled configuration path with
nginx -V. - Locate the enabled server block for the hostname being moved.
- Create the destination directory, such as
/srv/my-site/html. - Copy the old root’s contents while preserving required metadata.
- Verify that the new directory has the same relative file layout.
- Change the intended server-level
rootdirective. - Audit more-specific
root,alias, andtry_filesdirectives. - Ensure parent directories are traversable and files are readable by NGINX.
- Check symlinks and mandatory-access-control policy.
- Run
sudo nginx -t. - Reload with
sudo systemctl reload nginx. - Test the home page, a nested asset, and an application route.
- Keep the old directory until verification and rollback needs are resolved.
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.

