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
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
Apache is usually not overriding a correctly matching virtual host. It is serving the first virtual host for the requested address and port because the request’s host name, port, or enabled configuration does not match your custom block. On Ubuntu and Debian, 000-default.conf is often first in /etc/apache2/sites-enabled, so it becomes the fallback. Inspect Apache’s parsed map, correct ServerName/ServerAlias and the address-port pair, enable the site, reload Apache, and test with the exact hostname configured in the vhost.
How Apache chooses a virtual host
Apache evaluates a request in two stages. First, it finds the local address and port that received the connection. It then examines the virtual hosts configured for that address-port pair and compares the request’s Host name with each block’s ServerName and ServerAlias.
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- Address and port are selected. A block for
*:80belongs to HTTP on port 80. A block for*:443belongs to HTTPS on port 443. They are separate groups. - Names are compared in configuration order. A matching
ServerNameorServerAliasselects that virtual host. - The first block is the fallback. If no name matches, Apache uses the first name-based virtual host listed for that address and port.
The practical consequence is important: a default file does not defeat a valid name match merely because its filename starts with 000. It catches requests that have no matching name in the correct address-port group. Ordering matters for unmatched requests and duplicate names, not for a request that matches a unique, correctly loaded ServerName or ServerAlias.
Apache’s own documentation summarizes the rule this way: “The first name-based vhost in the configuration file for a given IP:port pair is significant because it is used for all requests received on that address and port for which no other vhost for that IP:port pair has a matching ServerName or ServerAlias.” That is why changing a filename is rarely the real fix. The hostname, port, and loaded configuration must line up first.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Why the stock default site appears
The request was made with an IP address
When you browse to an IP address, the request may carry that IP as its host name rather than the domain name in your custom block. If no virtual host lists that value, Apache falls back to the first block for the address and port. This is why a domain can appear correct while visiting the server’s IP shows the default page.
The custom name is not declared
Every intended virtual host should have an explicit ServerName. Put additional hostnames, such as a www form, in ServerAlias. Without those directives, Apache may inherit or deduce a name that does not match the browser’s request.
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 →The file is not enabled
Ubuntu and Debian normally keep editable site files in /etc/apache2/sites-available and load enabled-site links from /etc/apache2/sites-enabled. Editing a file in sites-available changes nothing until that site is enabled. The a2ensite command creates the enabled link; a2dissite removes it.
The request uses another port
A *:80 virtual host cannot answer a connection received on *:443. If HTTPS is involved, Apache performs matching within the 443 group. Correcting only the HTTP block leaves the TLS request using whichever *:443 block matches or appears first.
The alias is slightly different from the name being requested
Host matching is name based, so small differences matter. A block containing example.com does not automatically cover www.example.com, and a name entered with a different spelling is not a match. List each intended public name explicitly and test each one. DNS pointing several names at one address does not add those names to Apache’s configuration.
Inspect Apache’s active virtual-host map
Start with Apache’s own parsed configuration rather than guessing from filenames:
sudo apachectl -S
This command is the authoritative view of the virtual-host map Apache has loaded. Read the output for each relevant address and port.
- Find the address-port pair receiving the request, such as
*:80or*:443. - Identify the first virtual host listed for that pair. That is the fallback when no name matches.
- Confirm that your intended
ServerNameand everyServerAliasappear under the expected pair. - Note the file path Apache reports for each block. This reveals whether the active file is the one you edited.
- Look for duplicate
ServerNameorServerAliasvalues and unexpected names that could capture a request first.
If your custom block does not appear at all, it is not active, is in a configuration location Apache is not loading, or contains a configuration problem that prevented it from being parsed. If it appears under the wrong port, change the virtual-host declaration or investigate which port the client is actually using.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Run this command after every structural change, not just after the first edit. Enabling a second file, disabling 000-default, or adding an alias can change the parsed order and expose a duplicate name. The output also distinguishes a problem in the file you edited from a problem caused by another enabled file.
Repair the custom virtual host
Use an explicit matching block
Edit the intended file under /etc/apache2/sites-available/. A minimal HTTP block looks like this:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example
</VirtualHost>
Replace the example names and document-root path with the values for your application. The directives that determine name-based selection are the address and port in <VirtualHost>, ServerName, and ServerAlias. Directory permissions, application-specific directives, logging, rewrites, and security settings must match your deployment but do not change the basic selection rule.
Cover every hostname users will send
Decide which names should serve the site and declare them deliberately. If users enter both the bare domain and its www form, list one as ServerName and the other as ServerAlias. A name omitted from the block is not a match, even if its DNS record points to the same server.
Check for duplicate declarations
A hostname should not be declared unintentionally in multiple virtual hosts for the same address and port. Apache processes those declarations in configuration order, so a duplicate can make the earlier block win while the later block appears to be ignored. Remove the duplicate or move the name to the block that should serve it, then inspect the parsed map again.
Keep the address-port pair consistent
Compare the declaration with the traffic you are testing. A request to HTTP on port 80 belongs to a *:80 group; a request to HTTPS on port 443 belongs to a *:443 group. If the custom block is listed only in one group, it can work in one browser URL and appear to be overridden in the other. Treat each group as a separate configuration that needs its own names and, where applicable, its own document root and TLS settings.
Enable the site and apply the change
After saving the file, enable it and reload Apache:
sudo a2ensite example.conf
sudo systemctl reload apache2
Use the actual filename, including its .conf suffix when that is how the file is named. Enabling creates the link in /etc/apache2/sites-enabled; reloading makes the running server read the current enabled configuration without requiring a full machine restart.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Run the map inspection again:
sudo apachectl -S
Confirm that the custom file is now listed, its address-port pair is correct, and its names are present. Then request the site by the exact configured hostname, not by the server IP. Test the bare name and each alias separately so a missing alias does not remain hidden.
If the command reports a different file path than the one you edited, correct the enabled link or edit the file that Apache actually loaded. A correctly written block has no effect until the active configuration points to it.
Recommended Free Tools
Disable the stock default when it should not answer
If the packaged default page has no useful purpose on this server, disable it:
sudo a2dissite 000-default
sudo systemctl reload apache2
The command removes the enabled link for the stock site. Run sudo apachectl -S afterward and verify that the intended virtual host is still present.
Disabling the default is not a substitute for fixing name matching. It removes one fallback, but an unmatched request can still be served by another first-listed virtual host. Keep a deliberate default site when you want unknown hostnames or direct-IP requests to receive a controlled landing page, rejection page, or maintenance response. In that design, make the custom blocks’ names explicit and treat the default as a documented catch-all rather than expecting it to route named domains.
Ubuntu’s a2ensite documentation notes that the first enabled virtual host is treated specially because requests that match no actual directive are sent there. Therefore, removing 000-default changes the fallback, but it does not make an incorrectly named request match your application. The safer sequence is to establish a correct custom match first, then decide whether the stock catch-all should remain.
Test the request the way users make it
Use the configured domain
Open the bare domain and every declared alias in a browser. The hostname in the address bar must exactly correspond to a ServerName or ServerAlias in the active block. A DNS record pointing at the server is necessary for users to reach it, but DNS alone does not select a virtual host; Apache still needs the incoming host name to be listed.
Test HTTP and HTTPS independently
For HTTP, inspect the *:80 group and test the domain over port 80. For HTTPS, inspect the *:443 group and test the same names over TLS. A successful HTTP test does not prove that HTTPS uses the same document root or certificate configuration. If HTTPS displays the default site, correct or enable the matching *:443 block rather than changing only the port-80 file.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Distinguish a DNS problem from a vhost problem
If the domain does not reach the server at all, verify that its DNS destination is correct before interpreting the page you see. If it reaches Apache but shows the wrong site, compare the browser’s hostname with the names shown by apachectl -S. This distinction prevents repeated vhost edits when the request is arriving at a different address or server.
Recheck after every structural change
Whenever you enable, disable, rename, or edit a site, reload Apache and rerun apachectl -S. This catches a wrong path, an unexpected enabled file, a duplicate hostname, or a changed fallback before you interpret browser output.
Common fixes that fail and why
| Attempt | Why it fails | Corrective action |
|---|---|---|
| Browse to the server IP | The request may contain the IP rather than the domain, so no custom name matches. | Test with a hostname listed in ServerName or ServerAlias; keep a deliberate IP fallback only if desired. |
Omit ServerName |
Apache may inherit or deduce a name that does not equal the request host. | Give every intended vhost an explicit ServerName and place alternate names in ServerAlias. |
Edit only sites-available |
That directory is for available files; Apache loads the enabled-site links. | Run sudo a2ensite your-file.conf, reload Apache, and verify the file path in apachectl -S. |
Fix *:80 while testing HTTPS |
Port 443 is a separate address-port group. | Inspect and configure a matching *:443 virtual host. |
| Rename files to force an order | Ordering changes the fallback and duplicate-name tie, but a correctly matching name should win regardless of whether its filename precedes 000-default. |
Fix the host name, address, port, and enabled status first; use ordering only to choose a deliberate fallback. |
| Disable the default without checking the map | Another first-listed block may still catch unmatched requests, and the custom block may not be active. | Inspect with apachectl -S before and after disabling the site. |
| Add a DNS record but no Apache name | DNS directs the connection to the server but does not create a ServerName or ServerAlias. |
Add the exact public name to the intended vhost, enable it, reload, and test that name. |
Choosing the right repair
Evaluate a proposed fix against five questions:
- Does the host name match exactly? Check spelling, the bare domain, and every alias users enter.
- Does the address and port match? Compare the request path—HTTP or HTTPS—with the
<VirtualHost>declaration shown byapachectl -S. - Is the file enabled? The active path must be under the enabled configuration, not merely present in
sites-available. - Should a default remain? Keep one when unknown names need a controlled response; disable the packaged site when it is only an unwanted placeholder.
- Are HTTP and HTTPS both covered? Treat the port-80 and port-443 maps as separate configurations and test both.
This framework prevents a common misdiagnosis: changing symlink order when the real problem is a missing alias, editing the wrong port when the browser is using HTTPS, or disabling a default page while the custom file remains disabled.
A repeatable Ubuntu/Debian procedure
- Run
sudo apachectl -Sand record the address-port pair, first-listed fallback, active file paths, and any duplicate names. - Open the intended file in
/etc/apache2/sites-available/. - Set an explicit
ServerName; add each alternate hostname withServerAlias. - Ensure the
<VirtualHost>address and port correspond to the traffic you are testing. - Enable the file with
sudo a2ensite example.conf. - Reload with
sudo systemctl reload apache2. - If appropriate, disable the packaged fallback with
sudo a2dissite 000-default, then reload again. - Run
sudo apachectl -Sonce more and verify the parsed map. - Test the exact
ServerNameand everyServerAliasover HTTP and, when configured, HTTPS.
What a correct result looks like
The final apachectl -S output should show your custom file under the address and port being tested, with its intended names associated with that block. Visiting those names should consistently reach the custom document root or application. An unmatched hostname may still reach the first-listed vhost if you intentionally kept a fallback; that behavior is expected and is distinct from a matching custom domain being sent to the default site.
Frequently asked questions
Why does Apache keep showing the default site?
Usually the request does not match the custom block’s address, port, ServerName, or ServerAlias, or the custom file is not enabled. Run sudo apachectl -S to see which vhosts are active and which one is first for the relevant address-port pair.
Why does the domain work but the server IP show 000-default?
The domain request carries a hostname listed in your custom vhost. The IP request may carry only the address, which is not listed, so Apache uses the first vhost as the fallback. That behavior is normal unless you deliberately add a matching name or create a controlled default response.
Free tools Windows power users keep installed
One-click scans. No signup required.
Do I have to rename my configuration file so it loads before 000-default?
No. A unique, correctly matching ServerName or ServerAlias wins even if the filename sorts after 000-default. Filename and enabled-link order matter for unmatched requests and duplicate names, not for a valid unique match.
Why did editing the file change nothing?
The file may exist only in /etc/apache2/sites-available. Apache loads the enabled-site links, so run sudo a2ensite your-file.conf, reload Apache, and confirm the path in apachectl -S.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Is fixing port 80 enough for HTTPS?
No. Port 443 is a separate virtual-host group. Configure and enable a matching *:443 block, then inspect that group and test the HTTPS URL independently.
Can several domains share one virtual host?
Yes, when each intended name is listed explicitly: use one ServerName and additional ServerAlias directives. Do not rely on DNS records alone, and avoid declaring the same name in multiple vhosts for the same address and port.
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 errorsShould I always disable 000-default?
No. Disable it when it is only an unwanted placeholder. Keep a deliberate first-listed vhost when unknown hostnames or direct-IP requests should receive a controlled landing, rejection, or maintenance response. In either case, named domains still need explicit matching configuration.
Further reference
For a deeper treatment of Apache configuration order and virtual-host diagnostics, an Apache HTTP Server administration book can provide broader operational context. The command and configuration checks above are sufficient to resolve the default-vhost symptom on a typical Ubuntu or Debian installation.
Frequently Asked Questions
Why does Apache keep showing the default site?
The request usually misses the custom vhost’s address, port, ServerName, or ServerAlias, or the file is not enabled. Run sudo apachectl -S and inspect the active map.
Why does the domain work but the server IP show 000-default?
The domain sends a matching Host name; the IP may not. With no matching name, Apache serves the first vhost for that address and port.
Do I need to rename the file before 000-default?
No. Correctly matching names win regardless of filename order. Order controls the fallback and duplicate-name ties.
Why did editing sites-available change nothing?
Apache loads enabled-site links. Enable the file with a2ensite, reload Apache, and verify its path with apachectl -S.
Is fixing port 80 enough for HTTPS?
No. Port 443 is a separate vhost group. Configure and inspect a matching *:443 block as well.
Should I always disable 000-default?
No. Keep it as a deliberate catch-all when useful; disable it when it is only an unwanted placeholder.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsThe Bottom Line
Use apachectl -S to see the address-port groups, names, order, and active files Apache is actually using. Give each custom vhost explicit ServerName and ServerAlias values, ensure the file is enabled, configure HTTP and HTTPS separately, reload Apache, and test the exact hostnames. Disable 000-default only when you no longer want it as the intentional fallback.
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.

