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
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
/var/www/html is the conventional default document root installed by Debian and Ubuntu web-server packages. It is not a Linux-wide requirement: Apache serves the directory named by its active DocumentRoot, while nginx serves the directory named by root in the selected server block. Your server’s enabled configuration—not the directory name—defines which files are public.
Use the default directory for a simple, single site if it suits your deployment. For multiple domains or stricter separation, give each site its own root, commonly beneath /srv or /var/www, and keep secrets, deployment artifacts and non-public application code outside that root.
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 /var/www/html actually is
The path is a conventional starting location, not a special filesystem feature. Debian- and Ubuntu-family packages commonly configure a newly installed Apache site with /var/www/html as its DocumentRoot. Ubuntu’s default nginx server block likewise uses root /var/www/html;. A different distribution, package, administrator or hosting panel may select another directory.
A web server does not automatically publish every directory named www. It reads its enabled virtual-host or server-block configuration, resolves the request against that configuration, and then applies access, rewrite and index rules. If the active configuration points at /srv/example.com/html, changing files in /var/www/html has no effect on that site.
#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.
What belongs there for a simple site
For a small static site, the selected root can contain the files intentionally meant to be downloaded: an entry page such as index.html, CSS, browser-side JavaScript, images, fonts and other public assets. A request for /images/logo.svg should resolve to the corresponding file under the configured root when server rules allow it.
What the directory name does not tell you
- It does not prove that Apache or nginx is installed.
- It does not prove that the directory is currently enabled or reachable.
- It does not identify which domain uses it when several sites share a server.
- It does not make files safe to store there. Anything under the effective public root may be eligible for HTTP retrieval unless access rules prevent it.
How a URL becomes a filesystem path
Apache: DocumentRoot plus the URL path
Apache’s DocumentRoot directive names the base directory for a virtual host. In its default mapping behavior, Apache appends the URL path to that directory. With DocumentRoot /var/www/html, a request for /fish/guppies.html maps to /var/www/html/fish/guppies.html. Authentication, rewrite rules, aliases, directory permissions and content-negotiation settings can alter the final result, but the document root is the starting point.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →<VirtualHost *:80>
ServerName example.com
DocumentRoot /srv/example.com/html
DirectoryIndex index.html
</VirtualHost>
The DocumentRoot in the selected virtual host matters more than the value in a disabled or example file. Apache can have several virtual hosts, each with a different root and hostname.
nginx: root, index and try_files
nginx uses a root directive inside a server block or location. Its index directive identifies default index files, and try_files is often used to test a requested path before handing the request to an application entry point.
server {
listen 80;
server_name example.com;
root /srv/example.com/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
Apache and nginx use different configuration syntax and file layouts. A guide that tells you to edit DocumentRoot in nginx, or root in Apache, is using the wrong terminology for that server.
Find the document root your server is really using
Inspect the enabled configuration before moving files. Looking only at the directory listing can send you to the wrong location.
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 #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
Check Apache
- List enabled site definitions:
ls -l /etc/apache2/sites-enabled/. - Search those definitions for roots and hostnames:
grep -R -nE 'DocumentRoot|ServerName|ServerAlias' /etc/apache2/sites-enabled/. - Ask Apache to display its parsed virtual-host map:
sudo apache2ctl -S. This helps identify which host definition is selected for a name and port. - Open the matching file under
/etc/apache2/sites-available/or its enabled link and read the activeDocumentRoot. - After a change, validate the configuration with
sudo apache2ctl configtest, then reload the service with your distribution’s service manager, for examplesudo systemctl reload apache2.
Apache’s Debian and Ubuntu layout separates available definitions from enabled ones. Editing an available file does not change traffic until the corresponding site is enabled and Apache is reloaded.
Check nginx
- Inspect enabled server blocks:
ls -l /etc/nginx/sites-enabled/. - Search for roots and names:
grep -R -nE '^[[:space:]]*root[[:space:]]|server_name' /etc/nginx/sites-enabled/. - Print nginx’s complete parsed configuration, including included files:
sudo nginx -T, then locate the relevantserver_nameandroot. - Validate edits with
sudo nginx -t. - Reload after a successful test:
sudo systemctl reload nginx.
The packaged default file is commonly linked as /etc/nginx/sites-enabled/default, but a custom server block may take precedence for the hostname you requested.
Confirm the result with a harmless test file
Create a clearly identifiable file in the suspected root, request its exact URL, and remove it afterward. For example, place root-check.txt containing a unique sentence in the active directory and request http://your-host/root-check.txt. A 404 indicates that the request is reaching another root, a different virtual host, a rewrite, an access rule or a different machine; it does not by itself prove the file was written incorrectly.
Organize one small website
A single site can use the package default while you are learning or while its deployment is intentionally simple:
/var/www/html/
index.html
assets/
site.css
site.js
images/
logo.svg
banner.webp
downloads/
public-guide.pdf
Keep the hierarchy understandable. Use stable, lowercase names for URLs, keep build output in a predictable directory, and avoid placing temporary archives beside live assets. If a framework expects a public subdirectory, configure the server to use that subdirectory rather than exposing the project directory above it.
When the default root is a good fit
- There is one small site on the machine.
- The operating system package’s conventions are useful to your team.
- Your deployment process can update the directory without mixing private files into it.
- You have verified that the selected virtual host actually points there.
Use one root per site when hosting multiple domains
Do not put unrelated domains into one shared directory and rely on filename conventions to keep them apart. Give each site its own root and point the matching Apache virtual host or nginx server block at it.
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.
/srv/example.com/
html/
index.html
assets/
images/
private/
releases/
shared/
uploads/
/var/www/example.net/
html/
index.php
public/
The exact parent directory can be consistent across sites, but consistency is less important than an unambiguous mapping between hostname, configuration and root. A practical layout keeps enabled configuration in the operating system’s configuration directories and keeps site content in the site’s own tree.
Apache multi-site pattern
Create a separate virtual-host definition for each domain under /etc/apache2/sites-available/. Give each definition its own ServerName, any required aliases, and a distinct DocumentRoot. Enable the intended definitions into /etc/apache2/sites-enabled/, test the parsed configuration, and reload Apache. The hostname in the request then selects the matching virtual host.
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 matchnginx multi-site pattern
Create a server block for each domain, normally as a separate file under the nginx site configuration area. Set a distinct server_name and root for each block. Enable the files through the distribution’s sites-enabled links or included configuration, run nginx -t, and reload nginx.
Why separate roots help operations
- A deployment for one domain cannot accidentally overwrite another domain’s index file.
- Per-site logs, uploads and ownership decisions are easier to reason about.
- You can migrate or roll back one site without copying an unrelated tree.
- A mistaken hostname or server-block change is easier to diagnose from a small, explicit mapping.
/srv versus /var/www
The Filesystem Hierarchy Standard gives /srv a semantic role for site-specific data served by the system. /var is intended for variable data such as logs, mail and spool files. For that reason, /srv/example.com is a deliberate, standards-aligned choice for a site tree. Debian and Ubuntu administrators still commonly use /var/www, and package defaults make /var/www/html familiar.
| Location or concept | Typical meaning | Useful choice when |
|---|---|---|
/var/www/html |
Debian/Ubuntu package default document root | You have one straightforward site or want to follow the installed default |
/var/www/<site>/html |
Per-site roots under the familiar web hierarchy | Your team already standardizes on /var/www and needs multiple sites |
/srv/<site>/html |
Site-specific served data, separated by domain | You want the directory location to express the FHS role of hosted content |
Active DocumentRoot or nginx root |
The configuration-defined public boundary | You are diagnosing what a request can actually reach |
There is no performance advantage inherent in the spelling of the parent directory. The relevant differences are package expectations, team conventions, backup policy, ownership and the clarity of the security boundary.
Keep private and executable material outside the public root
Assume that a file under the effective document root could become downloadable if the server permits it. Do not store secrets or deployment material there merely because the application needs them.
Recommended Free Tools
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.
Keep these outside the served directory
.envfiles and credentials- Private keys and certificates that are not meant for download
- Database dumps and backup archives
- Source-control metadata and deployment manifests
- Unpublished release bundles and build caches
- Application configuration containing connection strings
A safer site tree separates public files from private data:
/srv/example.com/
html/ # only intentionally public files
private/ # configuration and secrets
releases/ # deployment artifacts, not directly served
shared/
uploads/ # expose only through deliberate application rules
Frameworks and public subdirectories
Many frameworks generate a project directory that contains both executable application code and a directory intended for web serving, often named public/. Point Apache’s DocumentRoot or nginx’s root at that public directory. Do not point it at the project’s parent merely because that is where the source checkout lives.
CGI and executable content
Ubuntu’s Apache guidance recommends keeping CGI scripts in a directory separate from and outside DocumentRoot, with ExecCGI enabled only for that directory. Treat executable files as a separate policy decision: identify the exact directory, grant only the required execution behavior, and avoid enabling execution across a broad public tree.
Permissions, ownership and deployment boundaries
The web-service account needs read access to files it serves and traverse access to each parent directory. It does not normally need write access to the entire document root. Granting broad write permissions makes a compromise or deployment mistake more damaging.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
A practical permission model
- Let a deployment account or group own the release files.
- Give directories search and read access needed by the web-service account.
- Grant write access only to directories that must receive uploads or generated caches.
- Keep secrets owned by the account that needs them and outside the public root.
- After changing ownership or modes, test both a normal public request and an intentionally protected file.
Uploads deserve special care. If users can upload files, store them outside the public root unless direct downloads are an explicit requirement. If they must be exposed, apply file-type, naming, size and access controls in the application and server configuration rather than trusting the filename extension.
Release directories and an explicit live path
For repeatable deployments, keep immutable releases outside the public directory and make the configured root point at the currently selected public release. A deployment can prepare a new tree, verify it, switch the configured path or a controlled link, and reload the server. The public boundary remains the directory named by the server configuration; release archives never become public simply because they are stored on the same disk.
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.
Common problems and how to diagnose them
“I edited /var/www/html/index.html, but the browser still shows another page.”
Inspect the enabled Apache virtual hosts or nginx server blocks and identify the root selected for the requested hostname. Check that DNS, the Host header, port and TLS configuration send the request to the machine you edited. Then place a temporary, uniquely named test file in the active root and request it directly.
“The server returns 403 Forbidden.”
Verify that the service account can traverse every parent directory and read the target file. Check directory access rules, authentication, mandatory access-control policies used by your distribution, and whether an index file is required when directory listing is disabled. A 403 is different from a missing file: the path may exist but be intentionally inaccessible.
“The server returns 404 Not Found.”
Confirm the URL-to-path spelling, capitalization and trailing slash behavior. Check rewrites and try_files rules, then verify that the file exists beneath the selected root. A 404 can also mean that the request matched a default server block rather than the site you intended.
“A secret file is visible over HTTP.”
Remove it from the public tree immediately, rotate any exposed credential, and review access logs. Moving the file elsewhere is the durable fix; a deny rule can be an additional safeguard but should not be the only boundary for secrets. Recheck backups, release directories and alternate hostnames for copies.
“My configuration edit had no effect.”
Run the server’s configuration test before reloading. Confirm that you edited an enabled or included file, not an unused example. For Apache, inspect apache2ctl -S; for nginx, inspect nginx -T. A successful syntax test does not guarantee that the intended virtual host wins the hostname selection, so verify the parsed mapping as well.
A decision framework for choosing your layout
- Inventory the server. Determine whether Apache, nginx or another server is active and locate its enabled configuration.
- Identify the public boundary. Read the selected
DocumentRootorroot; do not infer it from a conventional directory name. - Count the sites. Keep one simple site in the default root if that is operationally clear; use one root per domain when hosting multiple sites.
- Choose a parent directory. Use the package convention under
/var/wwwfor familiarity, or an FHS-oriented/srvtree for site-specific data. - Separate public and private data. Point the server at an intentionally public directory, commonly a framework’s
public/, and keep credentials, source and backups elsewhere. - Set ownership deliberately. Give the service account the minimum read and traverse permissions, with write access limited to required upload or cache directories.
- Validate and reload. Run
apache2ctl configtestornginx -t, reload the correct service, and test each hostname with a known file.
What to remember
/var/www/html is a useful Debian and Ubuntu default, not a mandatory location for websites. Apache’s DocumentRoot and nginx’s root establish the directory from which requests are resolved. For a single site, the default can be perfectly adequate. For multiple sites, use a separate root per domain, keep enabled configuration distinct from content, and consider /srv when you want the filesystem location to express that the data belongs to a served site. The strongest security rule is simple: expose only the directory designed to be public, and keep everything else outside it.
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.

