[Mod_log_sql] LogSQLMassVirtualHosting and mod_vhost_alias

Dave Steinberg dave at redterror.net
Sat Jan 21 18:12:37 EST 2006


> I'm rather impatient to get this new configuration up and running for
> our clients, so I went ahead and wrote a patch against
> mod_log_sql-1.100 that impliments this functionality.  I added on a
> configuration directive 'LogSQLTruncateDomains', added a flag to the
> global configuration structure, and tacked on some additional logic to
> the log_sql_transaction function.  The end result is that if you
> enable LogSQLTruncateDomains *and* LogSQLMassVirtualHosting then, for
> the purposes of the logging table name, any hostname of the form
> foo.bar.etc.domain.tld will be truncated to simply domain.tld.
> 
> I've tested this and it works on my system, but I don't claim to have
> tested it extensively so there could very well be a bug for some other
> configurations.

Just from glancing at the patch, it seems like it won't work well with 
domains like foobar.co.uk (since it only looks for 2 dots).

Perhaps there's a way to specify a regular expression instead, and have 
it strip off whatever matches?

LogSQLStripRegex ^www\.

Just a suggestion.  :)

-- 
Dave Steinberg
http://www.geekisp.com/
http://www.steinbergcomputing.com/



More information about the Mod_log_sql mailing list