What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
If Apache keeps showing its default page, it usually has not matched the hostname in your request to the virtual-host block you intended. Fix the mapping in this order: define an explicit ServerName and DocumentRoot, load the file, validate and reload Apache, make DNS (or a local hosts entry) point the name to this server, then request the same hostname and port that the block defines. Use apachectl -S and the error log to identify the exact mismatch instead of rearranging files blindly.
What Apache is doing when it serves the default page
Apache name-based virtual hosting makes several decisions before it selects content. It first chooses the best local IP address and port for the connection. Among the virtual hosts attached to that address and port, it compares the hostname sent by the client with each block’s ServerName and ServerAlias. If nothing matches, Apache serves the first listed virtual host for that address and port. That first block is therefore the fallback, which is commonly the distribution’s default page.
The hostname is taken from the HTTP Host header (and from the TLS server name indication during HTTPS negotiation). Visiting an IP address, using a different spelling of the name, or connecting to the wrong port can all prevent a match even when the configuration file looks correct.
Check these prerequisites before editing Apache
- The site directory exists. Confirm the intended document root and put a distinctive test file such as
index.htmlthere so you can tell which site answered. - Apache can read the directory and file. On Unix-like systems, check directory traversal permissions, file permissions, and any mandatory access-control policy in use. A readable configuration does not guarantee readable web content.
- The name resolves to this machine. Public DNS must return the server’s address. For a private or temporary test, a hosts-file entry can map the name only on the computer where you add it.
- You know which port the client uses. Plain HTTP normally reaches port 80; HTTPS normally reaches port 443. A
*:80block cannot answer a request sent to port 443. - You have permission to reload Apache. Configuration changes do not take effect until the service successfully reloads.
Build a working HTTP virtual host
1. Create a document root and unmistakable test page
Choose a directory that is appropriate for your operating system and deployment policy. The example below uses /var/www/example. Create an index file whose text identifies the 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.
sudo mkdir -p /var/www/example
sudo sh -c 'printf "<h1>example.com virtual host</h1>n" > /var/www/example/index.html'
Use your normal ownership and permission policy rather than making the directory universally writable. If Apache later reports permission errors, inspect the virtual-host error log and the operating system’s access-control logs.
2. Add explicit names and the intended document root
Each name-based block should state its identity explicitly. A minimal HTTP block is:
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
ServerAlias www.example.com
DocumentRoot /var/www/example
</VirtualHost>
ServerName is the primary hostname. Add a ServerAlias for every additional spelling you intend to serve, such as the www form. Keep aliases out of unrelated sites; an alias claimed by the wrong block can make the correct site appear to be ignored. Apache recommends explicitly setting ServerName in every name-based virtual host. Omitting it can make Apache inherit or derive a value that produces surprising matches.
3. Put the file where your distribution loads it
Packaging differs, so do not treat one distribution’s helper command as a universal Apache command.
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
- Debian and Ubuntu: place the site in the distribution’s sites-available directory, then use its
a2ensitehelper with the configuration filename. The helper creates the enabled-site link; it does not replace syntax validation or the reload. - RHEL, Fedora, CentOS and similar systems: put a
.conffile in the directory included by the main configuration, commonlyconf.d. There is usually no Debian-stylea2ensitestep. - Windows installations: add the block to a file included by
httpd.conf, or edit the included configuration directly. Run the Windows form of the syntax and dump commands shown below.
If you are unsure whether Apache reads the file, inspect the main configuration’s Include and IncludeOptional directives. A perfectly written block has no effect if it is outside the loaded configuration tree.
4. Validate, then reload
Validate before reloading so a typo cannot leave the running service unchanged or prevent a restart:
Recommended Free Tools
sudo apachectl configtest
sudo systemctl reload apache2 # Debian/Ubuntu service name
sudo systemctl reload httpd # RHEL/Fedora-family service name
The successful syntax result is normally Syntax OK. Use the service name installed on your system; if a reload command reports that the unit does not exist, identify the actual unit rather than editing configuration again. On Windows, run the equivalent executable from the Apache installation, for example:
httpd.exe -t
Then reload or restart the Windows service using the service-management method used by that installation. A restart is more disruptive than a reload and is not a substitute for fixing a failed syntax test.
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.
Make the hostname reach this server
Public DNS
Apache does not create DNS records. For a public site, create the appropriate DNS record with your DNS provider so example.com (and, if used, www.example.com) resolves to the address of this Apache server. Confirm the answer from a resolver rather than assuming that a recently changed record is already visible everywhere. If DNS points to another machine, that machine will receive the request and no local virtual-host change can correct it.
Hosts-file testing
For local testing, add a line containing the server address followed by the names:
203.0.113.20 example.com www.example.com
Use the hosts file on the same computer that will make the request. This mapping affects only that computer; it does not publish the name to colleagues, customers, mobile devices, or other servers. Remove or update the entry when the test ends so it does not mask a DNS problem later.
Request the exact name and port you configured
Typing the server’s IP address into a browser tests an IP-based fallback, not ServerName example.com. Type the configured hostname instead. Test each alias separately because an alias can be missing, duplicated, or pointed to a different address.
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.
An HTTP client makes the distinction explicit. If DNS is not ready but you know the destination address, use a temporary host override:
curl --resolve example.com:80:203.0.113.20 http://example.com/
curl --resolve www.example.com:80:203.0.113.20 http://www.example.com/
The URL still contains the hostname, so Apache receives the expected Host value while the connection goes to the chosen address. For an ordinary DNS test, use curl -I http://example.com/ and inspect the status and response headers. A response from the wrong site proves that a request reached Apache but selected another virtual host; a connection failure points to DNS, routing, a firewall, or the listening service instead.
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 →Configure HTTPS as a separate virtual host
HTTP and HTTPS are different listener contexts. If users visit https://example.com, define a block for port 443 in addition to the port-80 block:
<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example
SSLEngine on
SSLCertificateFile /path/to/fullchain-or-certificate.pem
SSLCertificateKeyFile /path/to/private-key.pem
</VirtualHost>
The exact TLS directives and certificate-file arrangement depend on the platform and certificate tooling. The important routing rule is fixed: a request sent to 443 cannot match only a *:80 block. Make sure the TLS module is loaded, the certificate covers every hostname you advertise, and the HTTPS block points to the intended document root or proxy settings.
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.
If HTTP should redirect to HTTPS, keep a port-80 block for the names so Apache can receive the request and issue the redirect. Do not delete the port-80 block merely because the final content is served over TLS.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Use apachectl -S to see Apache’s parsed map
After enabling the configuration, run:
sudo apachectl -S
On Windows, use:
httpd.exe -S
This command dumps the addresses, ports, server names, aliases, configuration files, and the default virtual host Apache believes it has loaded. Compare its output with the request you are making:
- Look for the exact port: the tested URL’s port must appear in the relevant block.
- Look for the exact name and spelling, including whether the
wwwalias is present. - Check the file path shown for the block. If it is absent, the file was not included or the enable step was missed.
- Note the first block for the address and port. That is the fallback for unmatched names, so a default page from that block is expected when the request hostname does not match.
- Look for duplicate
ServerNameorServerAliasentries. Apache’s troubleshooting guidance notes that only the first listed definition works when names are duplicated.
Do not “fix” an unmatched request by changing file order before verifying the hostname, destination address, and port. Reordering merely changes which site receives an invalid or unknown name.
Why the default page still appears
| What you observe | Likely cause | What to check or change |
|---|---|---|
| The IP address shows the default page, but the domain does too. | The domain is not resolving to this server, or the request uses a name not listed in the block. | Check DNS or the local hosts entry, then request the exact ServerName. |
The bare name works but the www name does not. |
The alias is absent, duplicated, or has different DNS. | Add one correct ServerAlias, ensure no other block claims it, and verify both DNS answers. |
| HTTP works but HTTPS shows the default page. | Only a port-80 block exists, or the port-443 block has a different name. | Create and load a matching *:443 block with valid TLS directives and certificate coverage. |
The file looks correct but apachectl -S does not show it. |
The file is outside the loaded include path or was never enabled. | Use the distribution’s enable mechanism or correct the Include path, then validate and reload. |
apachectl -S shows the name twice. |
Duplicate ServerName or ServerAlias definitions. |
Keep the name in the intended block only; remove or rename the competing definition. |
| The correct block appears, but Apache returns an error or an empty directory. | The document root is wrong, unreadable, or missing an index file; an access rule may also deny it. | Check the path, permissions, index configuration, and the error log. |
| The configuration test fails. | A syntax error, missing module, invalid path, or certificate problem prevents loading. | Fix the first reported error, run the test again, and reload only after it passes. |
Read the error log when the map looks right
Apache’s error log is the first place to look when the parsed virtual-host map and the visible content disagree. Read the lines generated at the time of a fresh request, not only old startup messages. Common clues include permission-denied messages for the document root, a missing index file, a failed certificate load, an unknown directive caused by an unloaded module, or a request being handled by an unexpected configuration file.
Generate one test request, note its timestamp, and then inspect the corresponding error-log entries. If the request never appears, investigate DNS, the listening address, a reverse proxy, or a firewall before changing virtual-host directives. If it appears under another site’s log, compare that site’s names and port with the request.
Name-based hosting, IP-based hosting, DNS, and hosts files
| Choice | How selection works | When it is useful | Limitation |
|---|---|---|---|
| Name-based virtual hosting | Several hostnames share an IP; Apache selects a block using the requested name after choosing the address and port. | Most ordinary multi-site servers; it uses fewer addresses and simpler network setup. | Every client must send the intended hostname, and each name must resolve to the shared address. |
| IP-based virtual hosting | Sites use separate IP addresses, so the address itself narrows the selection. | Cases requiring address-level separation or software that cannot provide the expected hostname. | It consumes additional addresses and does not remove the need for correct port and configuration mapping. |
| Public DNS | Resolvers worldwide obtain the address for a name. | Production sites and access from multiple networks. | Changes may take time to appear, and an incorrect record sends clients elsewhere. |
| Local hosts file | The local operating system maps a name directly to an address before or instead of normal DNS. | Private development and a quick test before publishing DNS. | Only the machine containing the entry is affected. |
A reliable recovery sequence
- Write down the exact URL you are testing, including its scheme, hostname, and port.
- Confirm that the intended document root exists and contains a distinctive test file.
- Give the block an explicit
ServerName, add only the requiredServerAliasvalues, and set the correctDocumentRoot. - Place or enable the file in a directory Apache actually includes.
- Run
apachectl configtest(orhttpd.exe -ton Windows) and correct every reported error. - Reload the appropriate Apache service.
- Verify DNS, or add a hosts entry on the machine making the test request.
- Request the configured name, not the server IP. Test the bare and
wwwforms separately. - Run
apachectl -Sand compare the parsed name, address, port, file, and fallback block with the request. - Read the error log for the timestamp of a new request if the response remains wrong.
- For HTTPS, repeat the checks against a loaded
*:443block and verify certificate and TLS-module configuration.
Common mistakes to avoid
- Assuming that creating an Apache file automatically creates a DNS record.
- Testing with an IP address while expecting Apache to match a domain-based
ServerName. - Adding a hosts entry on the server while testing from a different laptop or phone.
- Defining only
*:80and then diagnosing an HTTPS request as though it were HTTP. - Leaving
ServerNameout and relying on a machine hostname or inherited value. - Claiming the same name in multiple blocks and trying to solve the resulting ambiguity by reordering files.
- Reloading before running a syntax test, which can hide the real configuration error behind an unchanged running configuration.
- Changing permissions broadly as a first response. Identify the precise path and policy denying access, then apply the least-permissive correction.
When the default page is actually the expected result
A default page is correct when the request uses an unknown hostname, reaches the wrong address, or targets a port for which no matching name-based block exists. Apache must choose a fallback in those cases, and the first listed block is that fallback. Once DNS, the request hostname, the address and port, the loaded configuration, and the document permissions all agree, the intended virtual host will replace the fallback without any special browser setting.
Crashes, 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 minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Quick 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.

