Re: Virtual Host Configuration

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

 



Some clarifications.  I did not use a _default_ in the
virtual hosts, I am assuming the first virtualhost will
pick up any quieres not satisfied by the other virtual hosts.

Secondly, DNS has two A records
mydomain.edu
webmail.mydomain.edu
are the same ip 

Here is part of the httpd.conf ...

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80


<Virtualhost *>
     DocumentRoot /var/www
     ServerName mydomain.edu
     <Directory "/var/www">
        Order allow,deny
        Allow from all
     </Directory>
</VirtualHost>

# WebMail

<Virtualhost *>
     DocumentRoot /var/www/webmail
     ServerName webmail.mydomain.edu
     <Directory "/var/www/webmail">
        Order allow,deny
        Allow from all
     </Directory>
</VirtualHost>


As mentioned, when I include the above first virtualdomain for 
mydomain.edu, all quieres including those to webmail.mydomain.edu
end up at the first virtual server.  

thanks S

On Thu, 17 May 2007, Joshua Slive wrote:

   On 5/17/07, Shelley Waltz <shwaltz@xxxxxxxxxxxxxxxx> wrote:
   
   > Currently such inquires end up at webserver one and
   > the webmail page.  If I set up a default virtual host
   > on webserver one as
   > ServerName mydomain.edu, then all inquieres including
   > the ones for webmail.mydomain.edu go there.  Why is this?
   > ServerName webmail.mydomain.edu follows the default virtual
   > host.
   
   Sounds like you didn't setup vhosts correctly, but it would certainly
   help if you showed us the relevant part of the configuration so we
   could try to identify the mistake.
   
   Remember that when using name-based virtual hosts, you should never
   use a <VirtualHost _default_>. Instead, the first listed name-based
   virtual host is automatically the default.
   
   Joshua.
   
   ---------------------------------------------------------------------
   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
   
   


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