httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Diehl <tdi...@rogueind.com>
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/some-domain.com/html

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 some-domain.com and some-domain.net 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?

Regards,

Tom

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message