You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Julian Grunnell <jg...@firstnet.net.uk> on 2002/02/25 12:28:12 UTC
mod_rewrite / virtual host help
Hi - I'm looking for some help in converting the current web servers I run
from using virtual hosts to using mod_rewrite.
The platform is Apache/1.3.17 on Solaris 7 with SSL.
I currently have in the region of 600 virtual hosts with a handful of SSL
sites.
I have tested mod_rewrite on a test server using the Apache "Dynamically
configured mass virtual hosting" document and this works fine.
What I would like to do is replace several virtual hosts with the
mod_rewrite rules for more testing first, not just switch from all virtual
hosts to mod_rewrites in one go.
Is there a way to have both virtual host entries and mod_rewrites together
as I seem only to be able to get it to work with one or the other? The main
stumbling block I seem to have encountered is that mod_rewrite requires
UseCanonicalName to be Off whilst virtual hosts require it to be On.
Does anyone know if there is a way around this?
Thanks in advance - Julian.
- Julian Grunnell, 2nd Line Technical Support - Firstnet Services Limited
- tel: 0113 292 7736 : http://www.firstnet.net.uk
- [ This message subject to: http://www.firstnet.net.uk/disclaimer.html ]
---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
RE: mod_rewrite / virtual host help
Posted by Julian Grunnell <jg...@firstnet.net.uk>.
Cheers - used option 2 and it works a treat.
Many thanks - Julian.
- Julian Grunnell, 2nd Line Technical Support - Firstnet Services Limited
- tel: 0113 292 7736 : http://www.firstnet.net.uk
- [ This message subject to: http://www.firstnet.net.uk/disclaimer.html ]
-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: 25 February 2002 16:28
To: users@httpd.apache.org
Subject: Re: mod_rewrite / virtual host help
On Mon, 25 Feb 2002, Julian Grunnell wrote:
> Is there a way to have both virtual host entries and mod_rewrites together
> as I seem only to be able to get it to work with one or the other? The
main
> stumbling block I seem to have encountered is that mod_rewrite requires
> UseCanonicalName to be Off whilst virtual hosts require it to be On.
Two ways:
1. Use IP virtual hosts. Any IP addresses not captured by a virtual host
will fall back to the main server and get captured by rewrite rules.
2. Use name-virtual hosts. Any hostnames not captured by a virtual host
section will be served by the FIRST LISTED virtual host section. Place
your rewrite rules in the first listed virtual host section.
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
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: mod_rewrite / virtual host help
Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 25 Feb 2002, Julian Grunnell wrote:
> Is there a way to have both virtual host entries and mod_rewrites together
> as I seem only to be able to get it to work with one or the other? The main
> stumbling block I seem to have encountered is that mod_rewrite requires
> UseCanonicalName to be Off whilst virtual hosts require it to be On.
Two ways:
1. Use IP virtual hosts. Any IP addresses not captured by a virtual host
will fall back to the main server and get captured by rewrite rules.
2. Use name-virtual hosts. Any hostnames not captured by a virtual host
section will be served by the FIRST LISTED virtual host section. Place
your rewrite rules in the first listed virtual host section.
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
For additional commands, e-mail: users-help@httpd.apache.org