What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Put a website’s public files in the directory named by the active Nginx root directive. On a standard Ubuntu installation, that directory is /var/www/html. A custom site can use a path such as /srv/my-site/html, and each domain on a multi-site server should normally have its own document-root directory. Nginx appends the requested URI to that directory when it looks for a file.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
The path alone does not make an application work: Nginx must use the matching server block, the files must be readable and traversable by the Nginx worker, and PHP requests need a separate PHP-FPM handoff.
As an Amazon Associate I earn from qualifying purchases.
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 errorsWhat Nginx means by “website files”
A LEMP server separates the public document root from the rest of the operating system. The document root contains assets that a browser is allowed to request, such as HTML, CSS, JavaScript, images and the application’s public entry point. Nginx uses the root directive in the selected server block to find those assets.
For example, with this directive:
root /srv/my-site/html;
a request for /images/logo.png is resolved as /srv/my-site/html/images/logo.png. This is Nginx’s documented URI-to-filesystem mapping: the request URI is appended to the configured root. The same rule applies whether the root is under /var/www, /srv or another suitable filesystem location.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Do not put secrets, database files, private deployment keys, backups or configuration files containing credentials in that directory. Anything accidentally exposed through the active server configuration may be downloadable or processed by the web server.
Choose a document-root layout
There is no universal mandatory path. The correct location is the one referenced by the active server block and protected so that Nginx can read it without granting unnecessary write access.
Recommended Free Tools
| Situation | Typical root | How it is selected | Isolation and routing |
|---|---|---|---|
| One site using Ubuntu’s default configuration | /var/www/html |
The default server block already points there. | Simple single-site setup; the default configuration also handles an index file and a static-file fallback. |
| One custom site | /srv/my-site/html or another dedicated directory |
Set root explicitly in the site’s server block. |
Keeps the site separate from the distribution’s default content and makes the intended path clear. |
| Several domains | For example, /var/www/example.com/html per domain |
Each domain gets a server-block file in /etc/nginx/sites-available/, enabled through a matching symlink in /etc/nginx/sites-enabled/. |
Separate roots prevent one domain’s files from being mixed with another’s and let each host have its own routing rules. |
Ubuntu’s documentation makes the distinction explicit: “Even for a single-site configuration, while you can place your website at /var/www/html, you may want to place the website’s files at a different location in your filesystem.” The default is a convention, not a requirement.
Use /var/www/html for a straightforward single site
If you installed Nginx on Ubuntu or Debian and only need one simple site, start by checking the distribution’s default server block rather than creating a second root unnecessarily. Place the public files in /var/www/html, then make sure the active configuration contains an index setting and a sensible fallback.
A static configuration commonly includes:
server {
listen 80;
server_name example.com www.example.com;
root /var/www/html;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
}
The try_files expression checks whether the requested path is a file or directory under the root. If neither exists, Nginx returns a 404 response instead of passing the request to an unintended handler.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Copy your public index.html, stylesheet, scripts and image directories into the root. Keep source-control metadata, local environment files and deployment credentials outside it. After changing the configuration, test it and reload Nginx:
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 matchsudo nginx -t
sudo systemctl reload nginx
The first command should report a successful syntax check. Reloading applies a valid configuration without requiring a full service stop.
Create a custom root for one site
A custom path is useful when you want a clear per-project layout, a deployment volume under /srv, or a root that is independent of the distribution’s default welcome page.
- Create the directory tree. For example, create
/srv/my-site/html. The final directory is the public boundary; place only web-facing assets below it. - Copy the public files. Put the site’s index file, CSS, JavaScript, images and public application entry points in that directory. Keep secrets and private operational data elsewhere.
- Set ownership and modes deliberately. The Nginx worker needs permission to traverse every parent directory and read the files it serves. Ubuntu’s example applies mode
755to the custom tree before creatingindex.html. Add write permission only to directories that an application genuinely must modify. - Create or edit the server block. Set the site’s
server_name, the customroot, anindexfile and request handling. A static site can usetry_files $uri $uri/ =404. - Enable and validate it. If your installation uses the Debian/Ubuntu sites layout, put the configuration in
/etc/nginx/sites-available/and enable it with the corresponding link in/etc/nginx/sites-enabled/. Runsudo nginx -t, thensudo systemctl reload nginx.
For example, the relevant part of a custom static site might be:
server {
listen 80;
server_name example.com;
root /srv/my-site/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
The directory name itself has no special meaning to Nginx. What matters is that the path in the active server block exactly matches the directory containing the public files.
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 →Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Give every domain its own root
For multiple domains, avoid placing all sites in one shared directory. A common arrangement is:
/var/www/example.com/html
/var/www/another-example.net/html
Create one server-block file per domain under /etc/nginx/sites-available/. Each file should have the correct server_name and a root that belongs only to that domain. Enable each file with a symlink in /etc/nginx/sites-enabled/, then test and reload Nginx.
When a request arrives, Nginx first chooses a server block according to the listener and host name. It then applies that block’s root. If the host name is wrong, the request can land in the default server and appear to use the wrong directory even though the desired file exists elsewhere.
Separate roots also make deployment and permissions safer: a release for one domain can be copied into its own tree without changing another site’s files, and write access can be granted only to the application that needs it.
Set permissions without exposing the server
Nginx must be able to traverse the path and read the files. “Read” is not enough if a parent directory blocks traversal. Check every parent directory from the filesystem root to the document root.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
- Keep ordinary site files readable by the Nginx worker and avoid blanket write access.
- Grant write access only to an explicitly required upload, cache or generated-content directory.
- Do not make the entire document root writable by the web process merely to solve an upload or deployment problem.
- Store databases, backups, private keys and application configuration outside the public root.
- After changing ownership or modes, test both a normal asset and the application’s intended write operation.
Mode 755 is used in Ubuntu’s custom-site example, but the important principle is least privilege: the exact owner and group should reflect how you deploy and run the application, rather than being copied blindly to every server.
PHP files need PHP-FPM as well as a root
Putting a file ending in .php under the document root does not execute it. A PHP-enabled LEMP setup needs a location ~ .php$ block that forwards matching requests to the installed PHP-FPM socket. The socket filename depends on the distribution and PHP version, so use the socket that actually exists on your server instead of assuming one fixed name.
The public root should contain only the PHP files intended to be requested through the web application. Keep framework source, dependency caches, environment files and credentials outside the public boundary when the application’s design permits it. The PHP-FPM handoff belongs in the server block for that site; a different domain’s PHP location should not accidentally point at the same root or runtime settings.
A typical request therefore passes through three separate decisions:
- Nginx selects the server block from the connection and requested host name.
- The block’s
rootmaps the URI to a filesystem path. - A PHP location, when matched, sends the script to PHP-FPM; static files are served directly by Nginx.
If step three is missing or points to an unavailable socket, the directory location can be correct while PHP still fails.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Why Nginx returns 404 when the file exists
A 404 usually means the request is being resolved against a different path or the configured request rule deliberately rejected it. Work through these checks in order.
1. Confirm the active server block
Verify that the requested host name matches the server_name in the configuration you edited. A typo, an unenabled file or a request sent to an IP address can select the default server instead.
2. Reconcile the URI with the root
Apply the mapping literally. With root /srv/my-site/html;, /about.html must be at /srv/my-site/html/about.html. A file at /srv/my-site/about.html is one directory too high and will not satisfy that request.
3. Check capitalization and directory names
Linux paths are case-sensitive. /Images/logo.png and /images/logo.png are different requests if the directory names differ.
4. Inspect the location rule
For a static site, try_files $uri $uri/ =404 intentionally returns 404 when neither the requested file nor directory exists. For a front-controller application, its routing rule must be designed for that application rather than copied from a static site.
5. Check traversal and read permissions
Ensure the Nginx worker can traverse each parent and read the target. A permissions failure may be logged differently from a missing file, but correcting the path and access rights together avoids misleading tests.
Free tools Windows power users keep installed
One-click scans. No signup required.
6. Validate and reload
Run sudo nginx -t after edits and reload with sudo systemctl reload nginx. Testing a file before a successful reload can leave you diagnosing an old configuration.
A deployment checklist
- Choose one document root per site; use
/var/www/htmlonly when the default single-site layout suits the project. - Confirm the active server block’s
rootpoints to the directory containing the public index or application entry point. - For multiple domains, use separate roots and separate files in
/etc/nginx/sites-available/, enabled through/etc/nginx/sites-enabled/. - Keep secrets, databases, backups and deployment keys outside the public tree.
- Make every parent directory traversable and public files readable by Nginx; restrict writes to narrowly defined application directories.
- Use an appropriate
indexdirective and, for static content,try_files $uri $uri/ =404. - For PHP, configure a matching PHP-FPM location and the socket installed on that server.
- Run
sudo nginx -tand thensudo systemctl reload nginxafter configuration changes.
Which layout should you use?
Use /var/www/html when you are running one uncomplicated Ubuntu or Debian site and want the distribution’s default arrangement. Choose a dedicated path such as /srv/my-site/html when you want a clearly named project root or a custom deployment layout. For several domains, give each host its own directory and server-block file. In every case, the server block—not the directory’s name—defines what Nginx actually serves, while permissions and PHP-FPM configuration determine whether the files can be read and executed safely.
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.




