httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Coffey <gcof...@wmotion.com>
Subject Re: Rewrite Rules and Virtual Hosts
Date Sun, 10 Mar 2002 21:09:09 GMT
On 3/10/02 10:03 AM, "Bill -Sx- Jones" <sneex@mac.com> wrote:

>> I'm new...
>> 
>> I'm setting up a Rewrite Rule on our (new) apache server and all is working
>> well. But, per the FAQ, I had to turn on the Rewrite Engine and set the
>> inherit option for _every_ virtual host.
>> 
>> In my case, I _always_ want the rewriting to apply to _every_ virtual host.
>> I'm wondering if there is any way I can enable it globally and save the
>> trouble of fiddling with all the VirtualHost entries (which otherwise are
>> automatically generated and maintained by a GUI tool).
>> 
>> I don't _think_ the security issue mentioned in the FAQ applies to us
>> because we control all our virtual hosts. Nobody untrusted has any access at
>> all. I may be missing the point though.
> 
> 
> If the rules are the SAME for each VH - then place the rules in the global
> section OUTSIDE of the VH area.

I did this, but according to the docs I still need to do:

  RewriteEngine on
  RewriteOptions inherit

For every virtual host. Specifically, the faq says (Section H, Question 7):

> Why are RewriteRules in my VirtualHost parts ignored?
> 
> Because you have to enable the engine for every virtual host explicitly due to
> security concerns. Just add a "RewriteEngine on" to your virtual host
> configurationparts.

I'm wondering if there is a way around this.

It may seem like I'm nitpicking here (sorry :) ) but the crux of the problem
is that this is Mac OS X Server, maintained not by me but by folks coming
from WebStar/ASIP on Mac OS 9. Maintaining httpd.conf files is not a good
option for them. Apple provides GUI tools to do "typical" things with Apache
(like virtual hosts and SSL) but there is no support in the gui for rewrite
rules (probably a good thing!). The VirtualHost entries are in an include
file generated by the GUI tool automatically, and I'm afraid my changes will
be blown away the next time the tool regenerates it's include file (which
states in it that it should not be modified by hand). I'm working with the
macosx-admin list as well to see if there's a way to customize these entries
and still let these guys use the gui...

Thanks for your help!

Geoff 


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


Mime
View raw message