httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DuSTiN KRySaK <li...@mailroot.com>
Subject [users@httpd] **Virtual hosts question**
Date Tue, 03 Jun 2003 23:44:51 GMT
Hi there - I am having a crack at virtual hosts today...

I have 2 hosts...

I set them up like this in the httpd.conf file:

# Use name-based virtual hosting.
#
NameVirtualHost *
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *>
    DocumentRoot /var/www/html
</VirtualHost>

<VirtualHost *>
    ServerName host.domain.com
    ServerAdmin someone@domain.com
    ServerAlias host.domain.com *.host.domain.com
    DocumentRoot /var/www/html
    ErrorLog /var/log/httpd/host.domain.com-error_log
    CustomLog /var/log/httpd/host.domain.com-access_log custom
</VirtualHost>

<VirtualHost *>
    ServerName host2.domain.com
    ServerAdmin someone@domain.com
    ServerAlias host2.domain.com *.host2.domain.com
    DocumentRoot /var/www/host2html
    ErrorLog /var/log/httpd/host2.domain.com-error_log
    CustomLog /var/log/httpd/host2.domain.com-access_log custom
</VirtualHost>

My hostnames which work fine if I drop the first:

<VirtualHost *>
    DocumentRoot /var/www/html
</VirtualHost>


But I had added that because I wanted any http requests by IP, etc to come
to the main site (host.domain.com). Now with that entry in there all site
requests are going to the default site.....

How have I fudged my config?


I need:
Hostnames to go to their own site.
Any requests by IP to go to the main site.

Thanks!


   
  .::d::.

• --- THEbeatingsWILLcontinueUNTILmoraleIMPROVES --- •




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