www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Monks <G.Mo...@ukoln.ac.uk>
Subject mod_rewrite/570: ReWriteEngine On not inherited from general server config into virtual host config.
Date Sun, 11 May 1997 16:50:01 GMT

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

<virtualhost _default_>
    # 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...]
</virtualhost>

[...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:



Mime
View raw message