[thelist] Apache Virtual Hosts

Feingold Josh S Josh.S.Feingold at irs.gov
Thu Dec 19 12:40:02 CST 2002

[ Picked text/plain from multipart/alternative ]
I am trying to set up Apache on my local machine (Win XP) and am having some

Currently I have configured my hosts file to include three "server" names:
localhost, efeingold, secretguide.  Each of these servers points to

Before I set up my virtual hosts I was able to access the files in htdocs by
typing localhost, efeingold, or secretguide without any trouble.  I set up
two directories under htdocs, one named efeingold and one named secretguide
and placed an index.html file in both of them.

Then I went to set up the virtual directories.  Here is the code:

NameVirtualHost *
<VirtualHost *>
	DocumentRoot /htdocs/
	ServerName localhost
</VirtualHost *>

<VirtualHost *>
	DocumentRoot /htdocs/secretguide
	ServerName secretguide
</VirtualHost *>

<VirtualHost *>
	DocumentRoot /htdocs/efeingold
	ServerName efeingold
</VirtualHost *>

Once I ran this configuration trying to hit localhost, efeingold, or
secretguide all result in a 404 file not found error.  Anyone have any ideas
where I went wrong.  Keep in mind that the configuration file has not been
changed from the apache default except for that noted above.


More information about the thelist mailing list