Next:
Contents
Contents
Installing and Running mod_log_sql
Christopher Powell, <chris@grubbybaby.com>
Contents
1 Introduction
1.1 Homepage
1.2 Summary
1.3 Approach
1.4 What gets logged by default?
1.5 Miscellaneous Notes
1.6 Author / Maintainer
2 Installation
2.1 Requirements
2.2 Platform-specific notes
2.2.1 Solaris
2.2.2 BSD
2.2.3 Win32
2.3 Do I want a DSO or a static module?
2.4 Installation as an Apache DSO (Preferred)
2.5 Installation as a static module compiled into httpd
3 Configuration
3.1 Preparing MySQL for logging
3.2 A very basic logging setup in Apache
3.3 Testing the basic setup
3.4 How to tune logging with run-time directives
3.4.1 Instructing the module what to log
3.4.2 Instructing the module what NOT to log using filtering directives
3.5 Advanced logging scenarios
3.5.1 Using the module in an ISP environment
3.5.2 Logging many-to-one data in separate tables
3.5.3 Using the same database for production and test
3.5.4 Optimizing for a busy database
3.6 Configuration directive reference
3.6.1 LogSQLCookieLogTable
3.6.2 LogSQLCreateTables
3.6.3 LogSQLDatabase
3.6.4 LogSQLForcePreserve
3.6.5 LogSQLHeadersInLogTable
3.6.6 LogSQLHeadersOutLogTable
3.6.7 LogSQLLoginInfo
3.6.8 LogSQLMachineID
3.6.9 LogSQLMassVirtualHosting
3.6.10 LogSQLNotesLogTable
3.6.11 LogSQLPreserveFile
3.6.12 LogSQLRemhostIgnore
3.6.13 LogSQLRequestAccept
3.6.14 LogSQLRequestIgnore
3.6.15 LogSQLSocketFile
3.6.16 LogSQLTCPPort
3.6.17 LogSQLTransferLogFormat
3.6.18 LogSQLTransferLogTable
3.6.19 LogSQLWhichCookie
3.6.20 LogSQLWhichCookies
3.6.21 LogSQLWhichHeadersIn
3.6.22 LogSQLWhichHeadersOut
3.6.23 LogSQLWhichNotes
4 FAQ
4.1 General module questions
4.1.1 Why log to an SQL database?
4.1.2 Why use MySQL? Are there alternatives?
4.1.3 Is this code production-ready?
4.1.4 Who's using mod_log_sql?
4.1.5 Why doesn't the module also replace the Apache ErrorLog?
4.1.6 Does mod_log_sql work with Apache 2.x?
4.1.7 Does mod_log_sql connect to MySQL via TCP/IP or a socket?
4.1.8 I have discovered a bug. Who can I contact?
4.2 Problems
4.2.1 Apache segfaults when using PHP and mod_log_sql
4.2.2 Apache appears to start up fine, but nothing is getting logged in the database
4.2.3 Why do I get the message ``insufficient configuration info to establish database link'' in my Apache error log?
4.2.4 My database cannot handle all the open connections from mod_log_sql, is there anything I can do?
4.2.5 Why do I occasionally see a ``lost connection to MySQL server'' message in my Apache error log?
4.3 Performance and Tuning
4.3.1 How well does it perform?
4.3.2 Do I need to be worried about all the running MySQL children? Will holding open
n
Apache-to-MySQL connections consume a lot of memory?
4.3.3 My webserver cannot handle all the traffic that my site receives, is there anything I can do?
4.3.4 What is the issue with activating delayed inserts?
4.4 ``How do I...?'' - accomplishing certain tasks
4.4.1 I am using LogSQLMassVirtualHosting, and sometimes a single VirtualHost gets logged to two different tables. How do I prevent that?
4.4.2 How do I extract the data in a format that my analysis tool can understand?
4.4.3 How can I log mod_usertrack cookies?
4.4.4 What if I want to log more than one cookie? What is the difference between LogSQLWhichCookie and LogSQLWhichCookies?
4.4.5 What are the SSL logging features, and how do I activate them?
About this document ...
Chris Powell 2002-12-18