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.
Put your page at /var/www/html/index.html, make sure a web server is running, and open http://localhost/ (or http://127.0.0.1/). The directory is a filesystem document root, not a URL. A browser URL is formed from the host name plus the file path relative to that root.
For example, /var/www/html/about.html is opened at http://localhost/about.html. Apache maps this directory through its DocumentRoot directive; NGINX maps it through root. Both can serve static HTML from this location when their active configuration points there.
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 means
/var/www/html is a directory on the Linux machine. It is commonly configured as the web server’s document root on Ubuntu. Files below that directory become available through HTTP when a running Apache or NGINX instance receives a matching request.
The browser never requests the filesystem path directly. Instead, the server removes the leading slash from the request URI, appends the remaining path to its configured root, and looks for a file. If the root is /var/www/html, a request for /about.html is resolved as /var/www/html/about.html.
#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.
A directory request can resolve to an index file. Apache documents the conventional behavior this way: “Typically, a document called index.html will be served when a directory is requested without a file name being specified.” NGINX uses its root directive to locate the file and commonly uses an index setting to define the default file name.
Before you begin
- You need shell access to the Ubuntu machine, either locally or through a terminal session.
- You need a web server installed and running. This guide covers Apache HTTP Server and NGINX.
- You need permission to create or copy files into
/var/www/htmland to inspect the server configuration. - Your test browser must be running on the same machine when you use
localhostor127.0.0.1.
If the page must be reachable from another computer, use the server’s reachable host name or IP address instead of localhost. That is a networking and firewall question in addition to the local file-serving setup; a page that works at localhost is evidence that the local HTTP path works, not that the host is publicly reachable.
Free tools Windows power users keep installed
One-click scans. No signup required.
Put the HTML file in the document root
Use index.html for the homepage
Create or copy the landing page as /var/www/html/index.html. A minimal test file is enough to verify the service:
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>Test page</title>
</head>
<body>
<h1>It works</h1>
</body>
</html>
Save that content as /var/www/html/index.html. If you edit as a normal user and the directory is protected, create the file in your home directory and copy it with administrative privileges, or use an editor with the required permissions. Do not change ownership or permissions blindly; the web-server account must be able to traverse the directories and read the file, but the correct ownership model varies by deployment.
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
Add other pages below the same root
A file such as /var/www/html/about.html is a sibling of index.html. A nested page can be stored at /var/www/html/work/guppies.html. Keep the URL path and filesystem path aligned, including capitalization: Linux file names are case-sensitive.
Start the server and open the page
Apache HTTP Server
- Confirm that Apache is installed and running using the service-management tools provided by your Ubuntu installation.
- Ensure the active Apache virtual host has
DocumentRoot /var/www/html. Apache’sDocumentRootdetermines which filesystem directory is used for URL-to-file mapping. - If you changed the virtual-host configuration, restart Apache so the new configuration is loaded. On a systemd-based Ubuntu installation, the usual command is
sudo systemctl restart apache2. - Open
http://localhost/in a browser. Apache should look for/var/www/html/index.htmlwhen the request contains only the directory path.
NGINX
- Confirm that NGINX is installed and running.
- Inspect the enabled server block and verify that its
rootdirective points to/var/www/html. NGINX’srootdirective specifies the directory used to search for the requested file. - Verify that the server block’s index-file setting includes
index.htmlif you want the bare directory URL to open that file. - After a configuration edit, reload NGINX rather than stopping it. On a systemd-based Ubuntu installation, the usual command is
sudo systemctl reload nginx. If the configuration cannot be reloaded, test the configuration and correct the reported error before retrying. - Open
http://localhost/. NGINX should map the request to the configured root and select the index file.
Which URL opens each file?
Use the host followed by the path relative to the document root. The leading slash belongs to the URL path; it does not mean you should include /var/www/html in the browser address.
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 reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute| Filesystem path | URL on the same machine | What the server does |
|---|---|---|
/var/www/html/index.html |
http://localhost/ or http://127.0.0.1/ |
Uses the configured index-file behavior for the root directory. |
/var/www/html/about.html |
http://localhost/about.html |
Appends /about.html to the document root. |
/var/www/html/work/guppies.html |
http://localhost/work/guppies.html |
Maps the nested request URI to the matching nested file. |
/var/www/html/work/index.html |
http://localhost/work/ |
Uses the directory’s index file when the server is configured to do so. |
Apache’s mapping examples follow this same rule: a request for /fish/guppies.html resolves to /var/www/html/fish/guppies.html when that is the configured document root. NGINX likewise appends the request URI to the directory named by root.
Check the response without a browser
A browser is useful for rendering, while an HTTP client makes the returned status and headers visible. From the server itself, request the page with:
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.
curl -i http://localhost/
For a secondary page, use its relative URL:
curl -i http://localhost/about.html
A successful static page normally returns an HTTP success status and the HTML body. If the response is an error, use the URL path and the server’s active configuration as the starting point rather than editing the HTML blindly.
How Apache and NGINX map requests
The two servers perform the same basic job but expose different configuration concepts.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
| Concern | Apache | NGINX |
|---|---|---|
| Document-root directive | DocumentRoot |
root |
| Ubuntu default location for this task | Configured to serve /var/www/html in the default setup |
Configured to serve /var/www/html in the default setup |
| Bare-directory request | Looks for a conventional index document such as index.html |
Uses the server block’s index setting, commonly including index.html |
| Applying a changed configuration | Restart Apache after the edit; use the service name supplied by the installation | Reload NGINX after the edit so workers pick up the new configuration |
| Useful failure evidence | Active virtual-host configuration and service status | Active server block plus access.log and error.log |
The important point is not the brand of server: the active host or server block must point at the directory containing the file, and the requested URI must match the file’s relative path.
Troubleshoot a default page
If http://localhost/ shows a generic Apache or NGINX welcome page instead of your HTML, the request probably reached a different enabled virtual host or server block, or the expected file name is missing.
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.
- Check that the file is really named
index.html, not a similarly named variant such asIndex.htmlorindex.htm. - List the target directory and confirm the file is directly under
/var/www/html, not one level deeper than intended. - Inspect the active Apache virtual-host or NGINX server-block configuration and verify its document root is
/var/www/html. - After correcting configuration, restart Apache or reload NGINX as appropriate.
- Refresh the page and, if necessary, request the exact file explicitly at
http://localhost/index.html. An explicit request distinguishes an index-selection issue from a root-mapping issue.
Fix a 404 Not Found response
A 404 means the URL-to-file mapping did not find the requested path. Check the complete path one component at a time.
- Compare the URL spelling with the filesystem spelling, including uppercase and lowercase characters.
- Make sure the file is below the configured root. If the root is
/var/www/html, a file elsewhere on the machine is not selected by a request for that URL. - For a nested URL such as
/work/guppies.html, verify that/var/www/html/work/guppies.htmlexists. - For a directory URL such as
/work/, verify that the directory contains the configured index file, usuallyindex.html. - Check that you are testing the intended host and port. A different host name can select a different virtual host or server block even on the same machine.
Apache’s documented mapping and NGINX’s root behavior both make the relative-path check decisive: the requested URI must correspond to a real path below the active root.
Fix a 403 Forbidden or permission error
A 403 commonly indicates that the web-server process cannot traverse one of the parent directories or cannot read the requested file. The exact ownership and permission scheme depends on how the server and deployment were set up; there is no single safe ownership command for every Ubuntu installation.
- Inspect permissions on
/var/www,/var/www/html, each nested directory, and the file itself. - Ensure every parent directory permits traversal by the account used by the web server.
- Ensure the HTML file is readable by that account.
- If you changed permissions, retest the specific URL and avoid granting write access to the web-server account unless your application genuinely requires it.
- If the response remains 403, review the active server configuration for access rules and inspect the service’s error output.
Do not enable directory indexes merely as a way to browse the document root. Ubuntu guidance warns that exposing directory contents is usually undesirable. Serve an explicit index page or request a known file instead.
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.
Read logs when the request still fails
Logs show what the server received and why it rejected or failed a request. For NGINX, inspect both access.log and error.log. The access log confirms the requested URI and status; the error log can reveal root-path, permission, or configuration problems.
For Apache, inspect the active service status and the logs configured for the selected virtual host. A default page or unexpected status is often explained by the fact that a different host definition handled the request. Always correlate the log entry with the exact URL, host name, and time of your test.
Recommended Free Tools
Apply configuration changes safely
Changing an HTML file normally requires no server restart: the next request reads the updated static file. Changing the document root, virtual host, server block, or index settings is different because those values are held in the running service configuration.
Quick Recap
- For Apache, restart the service after changing the relevant configuration.
- For NGINX, reload the service after changing the relevant configuration.
- Use the server’s configuration-test facility before applying a larger edit, when available, so a syntax error does not replace a working configuration with a broken one.
- Retest both the root URL and one explicit file URL after the change.
A repeatable verification checklist
- Confirm the intended file exists at
/var/www/html/index.html. - Confirm the web server is running.
- Confirm Apache’s
DocumentRootor NGINX’srootpoints to/var/www/htmlfor the host you are testing. - Confirm
index.htmlis included in the index-file behavior. - Open
http://localhost/. - Open an explicit secondary URL such as
http://localhost/about.html. - If either request fails, classify the response as a default page, 404, or 403 and follow the matching troubleshooting branch.
- Check logs after configuration and permission changes, then repeat the request with the same host and path.
What to remember
/var/www/htmlis a filesystem document root, not a browser address.- The browser URL is the host plus the path relative to that root.
index.htmlis the conventional landing file for a directory URL.- Apache uses
DocumentRoot; NGINX usesrootand commonly anindexsetting. - A default page points to host-selection or file-name problems, a 404 points to URL-to-file mapping, and a 403 points to traversal or read permissions.
- Reload or restart after configuration changes, and use logs to identify failures rather than guessing.
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.

