If Apache shows its “It Works!” welcome page instead of your index.html, the server is responding but probably is not using the virtual host or document root you intended. Point the request at the correct hostname and port, verify the matching virtual host’s DocumentRoot, place the file in that directory, and check DirectoryIndex. Then reload Apache and use the logs to resolve any remaining mismatch.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What the “It Works!” page actually tells you
Apache’s Windows installation documentation says that, after installation, httpd should respond with a welcome page displaying “It Works!”. The archived installation guidance also treats that page as the expected initial response and directs administrators to error.log when access fails. Seeing it therefore proves that an Apache process answered the request. It does not prove that Apache selected your intended site, virtual host, or document directory.
As an Amazon Associate I earn from qualifying purchases.
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 welcome page is usually served by a default host configuration or a default document tree left by the installation. Your browser may be requesting a different hostname, an IP address, or a different port from the one configured for your site. Even when the correct virtual host is selected, its DocumentRoot may point somewhere other than the directory containing your files. A third possibility is that Apache is selecting another filename before index.html through DirectoryIndex.
Use this order to isolate the fault
| Check | What a passing result looks like | If it fails |
|---|---|---|
| Hostname and port | The browser URL uses the name and port on which your site’s virtual host listens. | Correct the URL, DNS or hosts-file mapping, or the port before changing files. |
| Virtual-host match | The request matches the block with the site’s ServerName or alias and port. |
Inspect host selection; a default block may be answering instead. |
DocumentRoot |
The configured directory contains the deployed site files. | Change the root or move the files into the directory Apache is using. |
| Index filename | index.html is directly inside that root, with exact spelling and case. |
Place or rename the file, or configure the intended filename. |
DirectoryIndex |
The desired filename appears in the directory-index list at the appropriate priority. | Remove or reorder an earlier default only if you understand its effect. |
| Access policy and logs | The relevant directory is permitted and reload completes without errors. | Align the <Directory> rule with the root and read access and error logs. |
1. Request the site you actually configured
Use the intended hostname
Enter the site’s real hostname in the browser, not merely localhost or the server’s IP address. Apache uses the host information in the request to choose among virtual hosts. A request for an IP address can therefore land on the default host even when the named site is configured correctly.
#1 Best Overall
Check the complete URL, including the scheme and port. HTTP and HTTPS commonly use separate virtual-host blocks, and a site listening on a nonstandard port will not be reached by a request to the default port. Test the exact combination that the site’s configuration declares.
Verify name resolution
The hostname must resolve to the machine whose configuration you edited. If the site is still under development, a hosts-file entry may be controlling the result; for a public name, DNS may point elsewhere. Confirm that the name reaches the intended machine before editing Apache. Otherwise, every local change can appear ineffective because another server is answering.
Recommended Free Tools
Use a direct file request as a diagnostic
Request the complete path /index.html at the intended hostname and port. If that URL returns your file while the site root (/) returns the welcome page, the host and document root are likely correct and the remaining issue is directory-index selection. If both URLs return the welcome page, continue with virtual-host and DocumentRoot checks.
2. Find the virtual host that answers the request
Match both name and port
Locate the virtual-host block whose ServerName or alias matches the hostname in your browser and whose listening port matches the URL. Apache applies host-specific settings when the request arrives, so a correct block is irrelevant if the request never matches it.
Do not assume that the first block you find is active. Installations often retain a default host for the server’s own welcome page. If the request uses localhost, an IP address, HTTP instead of HTTPS, or a different port, that default may be the one Apache selects.
Rank #2
- Used Book in Good Condition
Look for duplicate or overlapping definitions
Check whether the same name appears in more than one host block or whether an alias is missing. Resolve overlaps deliberately: the block must identify the requested name and listen on the requested port. Keep unrelated sites’ settings separate so that changing one root does not redirect another host to the same files.
Confirm you edited the configuration Apache is running
A machine can contain more than one Apache installation or instance. Make sure the service you reload uses the configuration file you changed. If a reverse proxy or container is in front of Apache, it may be answering the browser request or forwarding it to a different instance. The access log can help identify which request reached which service.
3. Set the correct DocumentRoot
Understand the filesystem mapping
DocumentRoot is the directory that forms the web-visible document tree. If it is set to /var/www/example, a request for /index.html maps to /var/www/example/index.html. Apache will not search every directory on the machine for a file with that name; it reads the path produced by this mapping.
Identify the directory that actually contains the deployed site, then compare it with the active host’s root. The file must be directly inside that directory for a request to /index.html. If your files are in a nested folder such as /var/www/example/public, either set that folder as the root or move the deployment so the configured mapping matches the URL structure you want.
Check spelling, case and path syntax
Use the exact filesystem path. On case-sensitive systems, Index.html, index.HTML and index.html are different names. On Windows, use the path syntax accepted by that installation and quote a path containing spaces, as in the configuration pattern below. Avoid silently creating a second copy of the file in the default Apache directory; that can make a test appear to work while the real site remains misconfigured.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Align the directory rule
The <Directory> section should refer to the same directory as DocumentRoot. Its access policy must allow Apache to serve the files. A root that is correct on disk can still produce an error or an unexpected response if the corresponding directory rule denies access or points at a different path.
4. Put the intended index file in place
Use the exact default name
Create or copy index.html directly under the active document root. Confirm that it is a real file rather than a directory with a similar name, and check the capitalization. If a deployment tool created a different filename, either rename it to index.html or configure that filename through DirectoryIndex.
Do not edit the welcome page in place
Replacing the installation’s welcome file can hide the configuration problem and may be undone by an upgrade or by another virtual host. The durable fix is to make the request select your site and to make that site’s root contain the intended file.
5. Correct DirectoryIndex selection
How directory requests are resolved
When the browser asks for /, Apache needs a default file. The DirectoryIndex directive controls the candidate filenames, including index.html. Apache tries the configured entries according to their order. A different file listed before index.html can therefore be returned even when your HTML file is present in the correct root.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsInspect competing defaults
Review the effective settings for the active host and any inherited configuration. If another welcome file appears first, remove or reorder entries only after checking what other applications rely on that filename. A broad change at server level can alter multiple sites; a host-specific setting is safer when only one site needs a different default.
Rank #4
Configure a nonstandard filename deliberately
If the project intentionally uses a name such as home.html, list that name in DirectoryIndex rather than expecting Apache to discover it. Keep index.html in the list when other paths or tools still depend on it, or remove it only when the site’s behavior has been checked.
6. Apply the configuration safely
Use the installation’s normal reload or restart procedure
After changing the virtual host, root, directory policy or index list, reload or restart Apache using the procedure provided by your operating system or service manager. A file edit does not change a running process until it reads the new configuration. If the service refuses to reload, do not continue testing the browser; resolve the configuration error first.
Check logs immediately
Read Apache’s access and error logs after the reload and after a fresh request. The installation guidance specifically points administrators to error.log when access fails. The access entry confirms which hostname, path and status were received; the error entry can reveal an invalid directive, a denied directory, a missing file or another path problem.
Retest without stale browser content
Open the exact URL again after the new configuration is active. If a browser cache or an intermediary is involved, use a fresh private window or another client for the diagnostic request. Compare the response for / with the direct /index.html request so that index selection and host selection remain separate tests.
Minimal virtual-host configuration pattern
The following pattern shows the relationship between the filesystem base and the default filename. Replace the hostname, port and path with values from your installation, and choose an access policy appropriate to that server:
Best Value
- Used Book in Good Condition
<VirtualHost *:80>
ServerName example.com
DocumentRoot "/var/www/example"
<Directory "/var/www/example">
Require all granted
DirectoryIndex index.html
</Directory>
</VirtualHost>
Here, DocumentRoot makes /var/www/example the base for web paths, while DirectoryIndex index.html tells Apache which file to use when the request names the directory. The <Directory> block applies the access rule to that same filesystem location. This is a pattern, not a universal policy: adapt the port, hostname, path and permissions to the local installation.
Troubleshooting branches when the welcome page remains
/index.html works, but / shows “It Works!”
The request is reaching a root that contains a usable file, so inspect DirectoryIndex and its ordering. Look for an earlier welcome filename, an inherited setting, or a host-specific rule that differs from the one you edited. Correct that list, reload Apache and test both URLs again.
PC 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 & 11Crashes, 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 minuteBoth / and /index.html show “It Works!”
Check host selection and DocumentRoot first. The browser may be using the wrong name, scheme or port; DNS or the hosts file may point elsewhere; or a default virtual host may be answering. Once the intended host is confirmed, verify that its root contains your file rather than the installation’s welcome content.
You receive an access error after changing the root
Compare the <Directory> path with DocumentRoot and review the access policy. A mismatch can leave Apache unable to serve the new directory even though the file exists. Use error.log to distinguish a permission or configuration problem from a missing file.
The change works briefly, then reverts
Check for a second Apache instance, a reverse proxy or a container serving the public address. Confirm that the service you reloaded is the one receiving the request and that its configuration includes your edited host. The access log and the URL’s resolved destination can expose this split.
HTTP works but HTTPS still shows the welcome page
Inspect the HTTPS virtual-host block separately. The two schemes commonly use different host definitions, roots and index settings. Configure the HTTPS block that matches the requested name and port, then reload and test the HTTPS URL directly.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →The hostname works on the server but not from another device
Compare name resolution on both devices. A local hosts-file entry may affect only the server, while public DNS may still point to another address. Do not change the document root until the remote request is demonstrably reaching the intended machine.
Common mistakes to avoid
- Testing only with
localhost: this can select a different virtual host than the public name. - Changing the first configuration block you find: the active block is determined by the request’s hostname and port.
- Putting the file beside, not inside, the root: Apache maps
/index.htmlbeneathDocumentRoot. - Ignoring capitalization: filename case matters on case-sensitive filesystems.
- Adding a new
DirectoryIndexwithout checking inherited entries: an earlier filename can still win. - Reloading the wrong service: another instance, proxy or container may continue answering.
- Skipping the logs:
error.logand the access log provide evidence about the request and the failure path. - Applying a global change for one site: prefer the matching virtual host when only that site needs a different root or index.
A repeatable verification checklist
- Open the site using its configured hostname, scheme and port.
- Confirm that DNS or the hosts file resolves that name to the machine running the edited Apache instance.
- Identify the virtual host whose
ServerNameor alias and port match the request. - Read that host’s
DocumentRootand verify that the directory contains the deployed files. - Confirm that
index.htmlis directly inside the root and uses the exact expected case. - Inspect
DirectoryIndexfor an earlier competing filename. - Ensure the matching
<Directory>rule permits Apache to serve the root. - Reload or restart Apache through the installation’s normal procedure.
- Request
/index.html, then request/, and compare the results. - Read the access and error logs if either response is still unexpected.
What to retain for future deployments
The installation welcome page is normal after Apache is first installed; it is not a diagnostic failure by itself. Four relationships determine whether your own page appears: the request’s hostname and port choose a virtual host, that host’s DocumentRoot chooses the filesystem base, DirectoryIndex chooses the default filename for a directory request, and the directory access policy determines whether Apache may serve it. Testing those relationships in that order avoids random edits and makes the logs meaningful when something still does not match.
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.




