Re: two aliases pointing to the same document root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 18, 2008 at 8:23 AM, Matthew Smith <chedderslam@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxxxx
>    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@xxxxxxxxxxxxxxxxxxxxxxx
>    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@xxxxxxxxx

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


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux