Hello.

I have been using apache for my local web development for some time,
and I am very happy with it.  I am trying something new, and have run
into a bit of trouble.

I am responsible for multiple web sites, and use the httpd-vhosts.conf
to point to different document roots for each site.  I also use
entries in my local hosts file to point to the different sites.  For
instance:
127.0.0.1       website1_com
127.0.0.1       website2_com

This has worked fine so far.  Now I am trying to have two different
aliases point to the same document root.  On the live site, we will
have multiple domains pointing to the same web server, and serve
content that is slightly different based upon domain name.  I am
trying to get my development environment to simulate this.

Here is what I have in my httpd-vhosts.conf file:
<VirtualHost *:80>
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot "C:\Inetpub\wwwroot\website1_com"
    ServerName website1_com
    ServerAlias website1_com
    ErrorLog "logs/website1_com-error.log"
    CustomLog "logs/website1_com-access.log" common
</VirtualHost>


<VirtualHost *:80>
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot "C:\Inetpub\wwwroot\website1_com"
    ServerName website2_com
    ServerAlias website2_com
    ErrorLog "logs/website2_com-error.log"
    CustomLog "logs/website2_com-access.log" common
</VirtualHost>

Please note that the document root is set to the same thing for both
entries.  When I go to http://website1_com/, the proper site is
served.  However, when I go to http://website2_com/, I just get the
directory listing of the root, c:\Inetpub\wwwroot\.

What am I doing wrong?

Thanks.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to