httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Re: Mass Virtual hosting and mod_rewrite
Date Wed, 27 Oct 2004 17:37:12 GMT
On Wed, 27 Oct 2004 09:50:03 -0400 (EDT), Tom Diehl <> wrote:

> I already have mod_vhost_alias running but I ran into a problem, if I have a
> site that has multiple domains such as and but they
> both serve the same content. I either have to maintain 2 separate directory
> structures or use symlinks. The problem with symlinks is that logrotate does
> not appear to have a way to NOT follow symlinks. I run split-logs and put the
> logs dir just above the doc root. When logrotate runs it rotates the logs once
> for each domain that points to a site. Not good. :-(
> I am just trying to avoid having to create a config file change for every
> site I need to add and still be able to handle the special cases. The docs
> for mod_vhost state it is only useful if all sites are configured the same,
> hence my quest for mod_rewrite rules.

mod_rewrite is not going to fix your problem with split-logs.

I see two relatively easy solutions:

1. Write your own logfile splitter based on on split-logs, but with
exceptions for the domains that need to be grouped together.

2. Canonicalize the URLs (that is, redirect people who come in on
alternative domain names to the "one true domain name).  This can be
done using some relatively simple mod_rewrite rules either in
httpd.conf or in an .htaccess file in your vhost docroot, or you can
add <VirtualHost> sections with Redirect directives for these specific
exceptions to httpd.conf.


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