[Mod_log_sql] problem getting work mod_log_sql under gentoo with apache2

Dice R. Random dicerandom at gmail.com
Sat Apr 29 15:14:19 EDT 2006


On 4/29/06, blue-dragon <blue-dragon at tele2.it> wrote:
> 1) yes the mysql user has rights for create and insert, also for lock...
> 2) in the log of apache there is nothing like an error:
>     the last few lines
> [Sat Apr 29 16:47:21 2006] [notice] caught SIGTERM, shutting down
> [Sat Apr 29 16:50:07 2006] [notice] suEXEC mechanism enabled (wrapper:
> /usr/sbin/suexec2)
> [Sat Apr 29 16:50:10 2006] [notice] Digest: generating secret for digest
> authentication ...
> [Sat Apr 29 17:00:06 2006] [notice] Digest: done
> [Sat Apr 29 17:00:06 2006] [notice] mod_python: Creating 32 session
> mutexes based on 150 max processes and 0 max threads.
> [Sat Apr 29 17:00:12 2006] [notice] Apache configured -- resuming normal
> operations
> [Sat Apr 29 17:03:34 2006] [notice] suEXEC mechanism enabled (wrapper:
> /usr/sbin/suexec2)
> [Sat Apr 29 17:03:37 2006] [notice] Digest: generating secret for digest
> authentication ...
> [Sat Apr 29 17:03:37 2006] [notice] Digest: done
> [Sat Apr 29 17:03:37 2006] [notice] mod_python: Creating 32 session
> mutexes based on 150 max processes and 0 max threads.
> [Sat Apr 29 17:03:40 2006] [notice] Apache configured -- resuming normal
> operations
> 3) here's my http.conf
>     if i uncomment anything with mod_log_sql apache says always that i
> have an error with my configuration file...

Just FYI, on Gentoo you don't really want to modify the httpd.conf
file directly if you can avoid it.  This saves from potentially nuking
it later while doing an etc-update or dispatch-conf after an apache
upgrade and losing all your changes.  Anything that is in the
/etc/apache2/modules.d directory and is named <something>.conf will be
automatically included by Apache when it starts up.  On my server I
have the following in /etc/apache2/modules.d/10_mod_log_sql.conf:

***SNIP***
<IfDefine LOG_SQL>
        LoadModule log_sql_module        modules/mod_log_sql.so
        LoadModule log_sql_mysql_module  modules/mod_log_sql_mysql.so

        <IfModule mod_ssl.c>
                LoadModule log_sql_ssl_module modules/mod_log_sql_ssl.so
        </IfModule>
</IfDefine>

<IfModule mod_log_sql.c>
        LogSQLLoginInfo mysql://user:pass@localhost/apachelogs
        LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock

        # LogSQLMassVirtualHosting automatically sets LogSQLCreateTables to 'on'
        LogSQLCreateTables on
        LogSQLMassVirtualHosting on
        LogSQLTruncateDomains on

        LogSQLMachineID machine_id
        LogSQLPreserveFile logs/mod_log_sql_preserve.sql

        # See http://www.outoforder.cc/projects/apache/mod_log_sql/docs-2.0/
        # for details about LogSQLTransferLogFormat
        # be compatible with the Combined Log Format (CLF)
        LogSQLTransferLogFormat AbHhmRSsTUuV
        <IfModule mod_ssl.c>
                LogSQLTransferLogFormat AbHhmRSsTUuV
        </IfModule>
</IfModule>
***SNIP***

This is for the 1.100 release.  Ignore the LogSQLTruncateDomains line,
that's an option specifically for a patch discussed previously on this
list.

Hope this helps.



More information about the Mod_log_sql mailing list