[Mod_log_sql] problem getting work mod_log_sql under gentoo with apache2

blue-dragon blue-dragon at tele2.it
Sat Apr 29 14:35:48 EDT 2006


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...
#
#  This is a modification of the default Apache 2 configuration
#  file by Gentoo Linux.  .... [insert more]
# 
#  Support:
#     http://www.gentoo.org/main/en/lists.xml    [mailing lists]
#     http://forums.gentoo.org/                  [web forums]
#
#  Bug Reports:
#     http://bugs.gentoo.org/      [gentoo related bugs]
#     http://bugs.apache.org/      [apache httpd related bugs]
### Section 1: Global Environment
ServerRoot "/usr/lib/apache2"

#LockFile "/var/run/apache2.lock"

<IfModule !perchild.c>
    #ScoreBoardFile /var/run/apache2_runtime_status
</IfModule>


PidFile "/var/run/apache2.pid"

TimeOut 300
KeepAlive on

MaxKeepAliveRequests 100

KeepAliveTimeout 15

<IfModule prefork.c>
    StartServers         5
    MinSpareServers      5
    MaxSpareServers     10
    MaxClients         150
    MaxRequestsPerChild  0
</IfModule>

<IfModule worker.c>
    StartServers         2
    MaxClients         150
    MinSpareThreads     25
    MaxSpareThreads     75
    ThreadsPerChild     25
    MaxRequestsPerChild  0
</IfModule>

<IfModule perchild.c>
    NumServers           5
    StartThreads         5
    MinSpareThreads      5
    MaxSpareThreads     10
    MaxThreadsPerChild  20
    MaxRequestsPerChild  0
</IfModule>

<IfModule peruser.c>
    ServerLimit          256
    MaxClients           256
    MinSpareProcessors     2
    MaxProcessors         10
    MaxRequestsPerChild 1000
    ExpireTimeout       1800
    Multiplexer nobody nobody
    Processor apache apache
</IfModule>

Listen *:80

# Authentication Modules
LoadModule access_module                 modules/mod_access.so
LoadModule auth_module                   modules/mod_auth.so
LoadModule auth_anon_module              modules/mod_auth_anon.so
LoadModule auth_dbm_module               modules/mod_auth_dbm.so
LoadModule auth_digest_module            modules/mod_auth_digest.so

# Metadata Modules
LoadModule charset_lite_module           modules/mod_charset_lite.so
LoadModule env_module                    modules/mod_env.so
LoadModule expires_module                modules/mod_expires.so
LoadModule headers_module                modules/mod_headers.so
LoadModule mime_module                   modules/mod_mime.so
LoadModule negotiation_module            modules/mod_negotiation.so
LoadModule setenvif_module               modules/mod_setenvif.so

# Logging Modules
LoadModule log_config_module             modules/mod_log_config.so
LoadModule logio_module                  modules/mod_logio.so
#LoadModule sql_log_module          libexec/mod_log_sql.so

#LoadModule log_sql_mysql_module      modules/mod_log_sql_mysql.so
#LogSQLLoginInfo mysql://apache:apache@localhost/apache
#LogSQLCreateTables on
#LogSQLDBParam socketfile /your/path/to/mysql.sock


# CGI Modules
LoadModule cgi_module                    modules/mod_cgi.so
LoadModule cgid_module                   modules/mod_cgid.so

LoadModule suexec_module                 modules/mod_suexec.so

# Mappers
LoadModule alias_module                  modules/mod_alias.so
LoadModule rewrite_module                modules/mod_rewrite.so
<IfDefine USERDIR>
    LoadModule userdir_module            modules/mod_userdir.so
</IfDefine>

# Handlers
<IfDefine INFO>
    LoadModule info_module               modules/mod_info.so
    LoadModule status_module             modules/mod_status.so
</IfDefine>
LoadModule actions_module                modules/mod_actions.so
LoadModule autoindex_module              modules/mod_autoindex.so
LoadModule dir_module                    modules/mod_dir.so

# Filters
LoadModule ext_filter_module             modules/mod_ext_filter.so
LoadModule deflate_module                modules/mod_deflate.so
LoadModule include_module                modules/mod_include.so
#LoadModule php4_module modules/libphp4.so


# Cache Modules
#LoadModule cache_module                  modules/mod_cache.so
#LoadModule disk_cache_module             modules/mod_disk_cache.so
#LoadModule mem_cache_module              modules/mod_mem_cache.so
#LoadModule file_cache_module             modules/mod_file_cache.so

# Proxy Modules
<IfDefine PROXY>
    LoadModule proxy_module                  modules/mod_proxy.so
    LoadModule proxy_connect_module          modules/mod_proxy_connect.so
    LoadModule proxy_ftp_module              modules/mod_proxy_ftp.so
    LoadModule proxy_http_module             modules/mod_proxy_http.so
</IfDefine>

# Uncommon Modules
#LoadModule case_filter_module            modules/mod_case_filter.so
#LoadModule case_filter_in_module         modules/mod_case_filter_in.so
#LoadModule echo_module                   modules/mod_echo.so
#LoadModule mime_magic_module             modules/mod_mime_magic.so
#LoadModule speling_module                modules/mod_speling.so
#LoadModule unique_id_module              modules/mod_unique_id.so
#LoadModule vhost_alias_module            modules/mod_vhost_alias.so

# Obsolete Modules
#LoadModule cern_meta_module              modules/mod_cern_meta.so
#LoadModule imap_module                   modules/mod_imap.so
#LoadModule usertrack_module              modules/mod_usertrack.so
#LoadModule asis_module                   modules/mod_asis.so


# Extra Modules
Include /etc/apache2/modules.d/*.conf

### Section 2: 'Main' server configuration
ServerAdmin root at gentoo
#ServerName localhost
UseCanonicalName off
<Directory "/">
    Options FollowSymLinks
</Directory>


    <Directory /www>
        AllowOverride FileInfo AuthConfig Limit Indexes
        Options +FollowSymLinks
#LogSQLTransferLogTable access_log
    </Directory>



DirectoryIndex index.php index.html index.pl


AccessFileName .htaccess

<Files ~ "^\.ht">
   Order allow,deny
    Deny from all
</Files>

TypesConfig /etc/mime.types

DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile /etc/apache2/magic
</IfModule>


HostNameLookups off


#EnableMMAP off


#EnableSendfile off


ErrorLog logs/error_log


LogLevel warn


LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" 
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%v %h %l %u %t \"%r\" %>s %b %T" script
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" 
\"%{User-Agent}i\" VLOG=%{VLOG}e" vhost

# You need to enable mod_logio.c to use %I and %O
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" 
%I %O" combinedio


CustomLog logs/access_log common
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent
#CustomLog logs/access_log combined

ServerTokens Prod


ServerSignature On


<IfModule mod_cgid.c>
    #
    # Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
    # for setting UNIX socket for communicating with cgid.
    #
    #Scriptsock            /var/run/cgisock
</IfModule>

<Directory "/www/cgi-perl/">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_autoindex.c>
    #
    # IndexOptions: Controls the appearance of server-generated directory
    # listings.
    #
IndexOptions FancyIndexing VersionSort

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif

ReadmeName README.html
HeaderName HEADER.html

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t .svn
</IfModule>

AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn 
no pl pt pt-BR ru sv zh-CN zh-TW

ForceLanguagePriority Prefer Fallback

AddDefaultCharset ISO-8859-1

AddCharset ISO-8859-1  .iso8859-1  .latin1
AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
AddCharset ISO-8859-3  .iso8859-3  .latin3
AddCharset ISO-8859-4  .iso8859-4  .latin4
AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5        .Big5       .big5
# For russian, more than one charset is used (depends on client, mostly):
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866       .cp866
AddCharset KOI8-r      .koi8-r .koi8-ru
AddCharset KOI8-ru     .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8       .utf8
AddCharset GB2312      .gb2312 .gb
AddCharset utf-7       .utf7
AddCharset utf-8       .utf8
AddCharset big5        .big5 .b5
AddCharset EUC-TW      .euc-tw
AddCharset EUC-JP      .euc-jp
AddCharset EUC-KR      .euc-kr
AddCharset shift_jis   .sjis

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddHandler type-map var

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" 
redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully

LoadModule status_module modules/mod_status.so
<Location /apache-status>
  SetHandler server-status
  Order allow,deny
  Allow from all
</Location>

LoadModule info_module modules/mod_info.so
<Location /server-info>
  SetHandler server-info
  Order allow,deny
  Allow from all
</Location>

DocumentRoot /www
ServerName server
User apache
Group apache
#LogSQLLoginInfo mysql://apache:apache@localhost/apache
#LogSQLCreateTables on
#LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock

Bye,
Max

Edward Rudd schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> blue-dragon wrote:
>   
>> Hello,
>> since 3 days i'm trying to set up od_log_sql with apache2 under
>> my gentoo machine.
>> i followed this documentation:
>> http://www.outoforder.cc/projects/apache/mod_log_sql/docs/
>>     
>
> you should be using
> htttp://www.outoforder.cc/projects/apache/mod_log_sql/docs-2.0/ for the
> current 1.100 release of mod_log_sql.
>
>   
>> now i have a database with the 5 tables access_log, cookies, headers_in,
>> headers_out and notes.
>> The mysqluser "apache" has rights to use this tables.
>>     
>
> insert and create rights on the database?
>
>   
>> But when i try to edit my http.conf i get always an error that the
>> syntax isn't correct.
>> So i set up my original http.conf and trie to get help in this mailing
>> list.
>> my mod_log_sql is unter /etc/apache2/modules.d/ 42_mod_log_sql.conf
>> Here it is its content:
>> <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://apache:apache@localhost/apache
>>        LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock
>>
>>        # LogSQLMassVirtualHosting automatically sets LogSQLCreateTables
>> to 'on'
>>        #LogSQLCreateTables on
>>        LogSQLMassVirtualHosting 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>
>>
>> Can anyone help me??
>> Sorry for my weak english and greets to all over the world from italy
>> Max
>>     
>
> Everything looks fine.  *IS* LOG_SQL defined by the gentoo init script?
> Also, add in a LogLevel debug in your main httpd.conf file (there may
> already be one in there with LogLevel warn).
> And start up apache and look at the error log for apache.  Then
> include/attach the relevant portion of that log file so we can figure
> out what is not working.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iD8DBQFEU2tevwMxRUUct20RAsO/AJ9u9Qm+wd3SFO4u/44d6Ej6uAGO9gCfYGY3
> ggf1fH/kCWgnmdpmq25UEoo=
> =8PGw
> -----END PGP SIGNATURE-----
> _______________________________________________
> 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 at lists.outoforder.cc
>
>   




More information about the Mod_log_sql mailing list