httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "craig franke" <craig.fra...@harlingen.tstc.edu>
Subject Re: [users@httpd] Virtual hosts on windows
Date Tue, 15 Oct 2002 15:39:41 GMT
Here is my VirtualHost setup [using named based virtual hosts and with substitute names] on
a Win2K advanced server /w Apache 2.0.42 and PHP 4.2.3:

NameVirtualHost *

<VirtualHost *>
    ServerAdmin admin@server
    DocumentRoot path_to_docroot
    ServerName some.edu
    ServerAlias alias1 alias2 alias3 alias4 alias5
</VirtualHost>

<VirtualHost *>
    ServerAdmin admin@server
    DocumentRoot path_to_docroot
    ServerName subdomain1.some.edu
    ServerAlias subdomain1
</VirtualHost>

<VirtualHost *>
    ServerAdmin admin@server
    DocumentRoot path_to_docroot
    ServerName subdomain2.some.edu
    ServerAlias subdomain2
</VirtualHost>


This works for me with no problems... If the browser doesn't send the hostname as part of
the request, they get the first server in the list.

Hope this helps,


Craig

>>> pgoggin@optusnet.com.au 10/15/02 08:05AM >>>
I have a local network consisting of a win 98 (running apache with php  and
mysql). and an NT box.

 I now want to set up two sites, using virtual hosts. The IP of the win98
box is 10.0.0.2 and of the NT box 10.0.0.3

The domain names will be www.sita.com.au and www.siteb.com.au.

I altered the hosts file to read:
10.0.0.2        www.sitea.com.au 
10.0.0.2        www.siteb.com.au.

I included the virtual hosts sections in the apache conf file:
NameVirtualHost 10.0.0.2

#
# 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 10.0.0.2>
    ServerAdmin webmaster@sitea.com.au 
    DocumentRoot "C:/usr/www/sitea"
    ServerName www.sitea.com.au 
    ErrorLog logs/sitea.log
    CustomLog logs/sitea.log common
    Port 80
# This should be changed to whatever you set DocumentRoot to.
#
 <Directory "C:/usr/www/sitea">

     Options Indexes FollowSymLinks MultiViews ExecCGI Includes
     AllowOverride None
     Order allow,deny
     Allow from all
 </Directory>

</VirtualHost>
 I have not included anything for site b yet.

In the browser I can only connect using the ip address 10.0.0.2. I expected
top be able to connect using www.sitea.com.au.

Can anyone please tell me what I have missed.
Regards

Peter Goggin


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.394 / Virus Database: 224 - Release Date: 3/10/02


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