Received: (from majordom@localhost) by hyperreal.com (8.8.5/8.8.5) id JAA21298; Sun, 11 May 1997 09:50:05 -0700 (PDT) Received: (from gnats@localhost) by hyperreal.com (8.8.5/8.8.5) id JAA21281; Sun, 11 May 1997 09:50:01 -0700 (PDT) Date: Sun, 11 May 1997 09:50:01 -0700 (PDT) Message-Id: <199705111650.JAA21281@hyperreal.com> From: Glen Monks Reply-To: Glen Monks To: apache-bugdb@apache.org Cc: apache-bugdb@apache.org Subject: mod_rewrite/570: ReWriteEngine On not inherited from general server config into virtual host config. In-Reply-To: Your message of Sun, 11 May 1997 09:46:34 -0700 (PDT) <199705111646.JAA20787@hyperreal.com> Sender: apache-bugdb-owner@apache.org Precedence: bulk >Number: 570 >Category: mod_rewrite >Synopsis: ReWriteEngine On not inherited from general server config into virtual host config. >Confidential: no >Severity: serious >Priority: medium >Responsible: apache (Apache HTTP Project) >State: open >Class: doc-bug >Submitter-Id: apache >Arrival-Date: Sun May 11 09:50:01 1997 >Originator: G.Monks@ukoln.ac.uk >Organization: apache >Release: 1.2b8 >Environment: /opt/web/servers/unicycle/apache wumpus # uname -a SunOS wumpus 5.5.1 Generic sun4m sparc SUNW,Sun_4_600 (this machine is www.ukoln.ac.uk) Built using Gcc, noting special added in, no tinkering. >Description: Our httpd.config goes something like this: # General server stuff: listen 138.38.32.10:80 # Allow use of mod_rewrite RewriteEngine on RewriteLog "/opt/web/servers/unicycle/apache/logs/rewrite.log" RewriteLogLevel 3 # Restrict privilages. User nobody Group nogroup HostnameLookups on [..etc..] # Config for www.ukoln.ac.uk, ukoln.ac.uk, ukoln.bath.ac.uk etc. [...etc...] # map home directories onto other machine: ReWriteRule ^/~(.*) http://homes.ukoln.ac.uk/~$1 [...etc...] [...etc...] We found that the rewiteRule wasn't getting executed. When we put "ReWriteEngine On" *inside* the virtual host config, it worked. The docs say that the ReWriteRule directive is suitable for the server config, so I assumed it would be inherited by the virtual hosts. >How-To-Repeat: I can send you our server configs before and after fixing it ourselves if you want. >Fix: Either change mod_rewrite so that once the engine is turned on in general config then it is on in the Vhosts (unless specifically turned off in them?) *or* say in the docs that it needs to be turned on in each one. %0 >Audit-Trail: >Unformatted: