[users@httpd] Virtual hosting: two domains using the same vhost?

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

 



Hello,

Is is possible for the virtual host to accept request for two domains?

For Example: My external DNS has vhost1.domain.net and vhost.domain.com
pointing to the IP Address. The current IIS server has two ip addresses
bound to the NIC. I am converting to Apache on Linux and wasn't sure if
I had to create a whole other section with the same information just
changing the ServerName directive, assign another ip to the server or
what. I hope this makes sense.

NameVirtualHost 192.168.1.1
<VirtualHost 192.168.1.1>
DocumentRoot "/var/web/dir/"
ServerName vhost.domain.com
  <Location /directory1>
      Order allow,deny
      Allow from all
      AuthType Basic
      AuthLDAPAuthoritative On
      AuthName "Authentium, Inc."
      AuthLDAPURL "ldap://192.168.1.2 192.168.1.3/?cn"
      require group cn=somegroup
  </Location>

Do I have to create this in order to accept conections for the same
information to a different domain? 

NameVirtualHost 192.168.1.1
<VirtualHost 192.168.1.1>
DocumentRoot "/var/web/dir/"
ServerName vhost.domain.net
  <Location /directory1>
      Order allow,deny
      Allow from all
      AuthType Basic
      AuthLDAPAuthoritative On
      AuthName "Authentium, Inc."
      AuthLDAPURL "ldap://192.168.1.2 192.168.1.3/?cn"
      require group cn=somegroup
  </Location>

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