httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Covener" <cove...@gmail.com>
Subject Re: [users@httpd] two aliases pointing to the same document root
Date Mon, 18 Aug 2008 13:07:39 GMT
On Mon, Aug 18, 2008 at 8:23 AM, Matthew Smith <chedderslam@gmail.com> wrote:
> 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 webmaster@dummy-host.website1.com
>    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 webmaster@dummy-host.website1.com
>    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>


NameVirtualHost *:80 ?  Are the ServerName and ServerAlias literally
what you're typing in your browser?

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message