Re: LogSQLMassVirtualHosting and mod_vhost_alias

Jorey Bump <[email protected]> Sun, 22 Jan 2006 11:27:14 -0500
Newsgroups gmane.comp.apache.mod-log-sql
Message-ID <[email protected]>
Bob Apthorpe wrote:

> Basically, if you match an xLD (top, second, third, fourth-level
> domain), /(([^.]+\.)(xLD))$/ should match the base domain where you'd
> store the log entry. www.example.co.uk and example.co.uk would match the
> 2LD '.co.uk' giving a base domain of example.co.uk for both. Similarly,
> www.example.austin.ci.tx.us and example.austin.ci.tx.us would end up
> under austin.ci.tx.us.

This use case is common, but the fix isn't flexible enough for all kinds 
of mass virtual hosting. For example, one might want to aggregate the 
results for www.example.net & www.example.com, or www.example.com & 
www.example.co.uk. Counting back from the TLD seems insufficient.

There should be support for arbitrarily combining results based on any 
combination of parts from the hostname in the request (select all 
requests to .com domains, or to any host with "example" as part of the 
FQDN).

How are people aggregating results with the current system (assuming 
separate tables for hosts)? Should there be an index table that hashes 
the parts of hostnames on the system, for easy discovery of table names 
to use in queries? What internal support does Apache provide that can be 
used to achieve this, such as  Directory Name Interpolation?

  http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html#interpol

The solution to this problem should at least be as flexible as is 
possible with mass virtual hosting (and then some), and should attempt 
to match or leverage Apache internals, as well.


_______________________________________________
Download the latest version at http://www.outoforder.cc/projects/apache/mod_log_sql/

To unsubscribe send an e-mail to 
mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org