Re: two aliases pointing to the same document root

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

 



Matthew Smith wrote:
[...]

Note : in your configuration, the 2 "ServerAlias" directives are unnecessary. You would only need a ServerAlias if one of the virtual servers was known by more than one "name".
Then you would use
  ServerName name1
  ServerAlias name2

Or, it may also be useful if your website is known under either its fully-qualified domain name, and also via a shorter "local" name :
  ServerName website1_com.mycompany.com
  ServerAlias website1_com

Also, if you did not care about using a single logfile for both of your virtual servers, you could reduce your config as follows :

<VirtualHost *:80>
    ServerAdmin webmaster@xxxxxxxxxxxxxxxxxxxxxxx
    DocumentRoot "C:\Inetpub\wwwroot\website1_com"
    ServerName website1_com
    ServerAlias website2_com
    ErrorLog "logs/allwebsites_com-error.log"
    CustomLog "logs/allwebsites_com-access.log" common
</VirtualHost>

André

---------------------------------------------------------------------
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