httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Riley <>
Subject [users@httpd] rewrite rules and allowoverride with mass vhost
Date Sat, 25 Sep 2010 05:23:53 GMT

Hi, Hopefully a simple Q as I am running around in circles a little bit.

I wish to use mass vhosts. I would like all sites to share a common
codebase/page repository - in this case "lib" which is a symbolic link
elsewhere. Each site has its own custom, db and images directories. I
can get these dirs onto the include path for php easily enough by
manipulating the path and using the HTTP_HOST value - so php include
access is not an issue.

What is causing me trouble however is getting "rewrite" to work in order
to point to the correct directories for http includes. e.g

So I added the rewrite rules below but they are not triggering. As you
see I tried debugging but I am getting nothing into the log file.

| LoadModule proxy_module /usr/lib/apache2/modules/
| LoadModule proxy_http_module /usr/lib/apache2/modules/
| LoadModule rewrite_module /usr/lib/apache2/modules/
| LoadModule vhost_alias_module /usr/lib/apache2/modules/
| RewriteLog "/home/user/rewrite.log" 
| RewriteLogLevel 9
| # get the server name from the Host: header
| UseCanonicalName Off
| # include the server name in the filenames used to satisfy requests
| VirtualDocumentRoot /home/user/webs/%0/lib/
| RewriteEngine On
| RewriteRule images /home/user/webs/%{HTTP_HOST}/images
| RewriteRule custom /home/user/webs/%{HTTP_HOST}/custom
| RewriteRule db     /home/user/webs/%{HTTP_HOST}/db
| <Directory  />
| AllowOverride All
| </Directory>

This is my first time trying to tinker with rewrite and its rather
daunting but I am pretty sure this is a simple oversight on my part ;)
Is it??

Any pointers/help much appreciated,



The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message