httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Diehl <>
Subject [users@httpd] Mass Virtual hosting and mod_rewrite
Date Tue, 26 Oct 2004 22:35:50 GMT
Hi all,

I am trying to get mass virtual hosting working using mod_rewrite but
I am having some problems. This is on RHEL3 with httpd-2.0.46-40.ent

The setup is as follows:
All individual sites main document roots are in /home/www/

The mod_rewrite config file looks like this:

ReWriteLog "/var/log/rewrite.log"
ReWriteLogLevel 3

ReWriteEngine   on
ReWritecond     %{HTTP_HOST}    (www\.)?([^.]+)\.(com|net|org)
ReWriteRule     (/.*) /home/www/%2.%3/html/$1   [L]

This almost works except that if I have something like awstats that
is accessed via a ScriptAlias the above mod_rewrite rules also rewrite
that url.

What I am trying to accomplish is to have the ability to just drop a directory
into /home/www and have the site just work, If there are special conditions
such as a site that responds to and then I 
simply want to add a VirtualHost block for just those hosts and have that work
also. In addition I need packages that are installed on the system and use
things like ScriptAlias cgi's etc. to still work.

I cannot believe I am the only one in the world to want to do this, so I am
assuming I am missing something simple. So far the docs I have read and google
have not yielded a solution. :-( 

Can someone tell me what I am doing wrong?



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