httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shelley Waltz <shwa...@cabm.rutgers.edu>
Subject Re: [users@httpd] Virtual Host Configuration
Date Thu, 17 May 2007 14:44:25 GMT
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@cabm.rutgers.edu> 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@httpd.apache.org
      "   from the digest: users-digest-unsubscribe@httpd.apache.org
   For additional commands, e-mail: users-help@httpd.apache.org
   
   


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