httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Steel <john.st...@phonewebcam.com>
Subject Re: [users@httpd] IP address discimination
Date Tue, 17 Apr 2007 18:19:13 GMT
Boyle Owen wrote:
> You must have a NameVirtualHost directive somewhere for 1.2.3.4 (any
> included files?). Anyway, why fight it? You absolutely *need*
> NameVirtualHost to do name-based virtual-hosting so just type it in and
> end the pain.
>   
I found them in httpd.include - it begins like this:
NameVirtualHost 1.2.3.4:80
NameVirtualHost 1.2.3.5:80
..
NameVirtualHost 1.2.3.4:443
NameVirtualHost 1.2.3.5:443

> Couple of other points... 
> - Why use ServerAlias instead of ServerName? Maybe it works, but then I
> guess you could drive a car by operating the clutch with your right
> foot, too.
>   
So I changed httpd.conf to read as follows, and the "overlapping" error 
went away:

<VirtualHost *>
ServerName example1.com
Redirect permanent / http://www.example1.com/
</VirtualHost>

<VirtualHost *>
ServerName example2.com
Redirect permanent / http://www.example2.com/
</VirtualHost>

But using http://example1.com in a browser didn't do the redirect.
Is this what you meant? Thanks for the help so far.

-- 
--------------------------
http://www.phonewebcam.com
john.steel@phonewebcam.com


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