diff options
-rw-r--r-- | CHANGELOG | 10 | ||||
-rw-r--r-- | INSTALL | 47 | ||||
-rw-r--r-- | Makefile | 8 |
3 files changed, 53 insertions, 12 deletions
@@ -1,4 +1,4 @@ | |||
1 | $Id: CHANGELOG,v 1.5 2002/01/15 18:40:14 helios Exp $ | 1 | $Id: CHANGELOG,v 1.6 2002/02/24 20:17:16 helios Exp $ |
2 | 2 | ||
3 | 3 | ||
4 | TODO: | 4 | TODO: |
@@ -9,6 +9,13 @@ TODO: | |||
9 | 9 | ||
10 | CHANGES: | 10 | CHANGES: |
11 | 11 | ||
12 | 1.14: | ||
13 | * Improved the apxs instructions based on user feedback, including the | ||
14 | mysql.sock define issue. | ||
15 | * Corrected the INSTALL example directives to the new format. | ||
16 | * Some improvements to 'make distro' | ||
17 | |||
18 | |||
12 | 1.13: | 19 | 1.13: |
13 | 20 | ||
14 | * Now use ap_get_server_name() in extract_virtual_host() to fix the | 21 | * Now use ap_get_server_name() in extract_virtual_host() to fix the |
@@ -22,6 +29,7 @@ CHANGES: | |||
22 | machine and is ignored in that case (although it still must be defined | 29 | machine and is ignored in that case (although it still must be defined |
23 | for the connect to work). | 30 | for the connect to work). |
24 | 31 | ||
32 | |||
25 | 1.12: | 33 | 1.12: |
26 | 34 | ||
27 | * Added a mysql_close() call to get rid of those annoying MySQL | 35 | * Added a mysql_close() call to get rid of those annoying MySQL |
@@ -1,4 +1,4 @@ | |||
1 | $Id: INSTALL,v 1.4 2002/01/15 18:40:14 helios Exp $ | 1 | $Id: INSTALL,v 1.5 2002/02/24 20:17:16 helios Exp $ |
2 | 2 | ||
3 | 3 | ||
4 | Requirements | 4 | Requirements |
@@ -28,6 +28,16 @@ Requirements | |||
28 | are available as RPMs. | 28 | are available as RPMs. |
29 | 29 | ||
30 | 30 | ||
31 | Do I want a DSO? | ||
32 | ================ | ||
33 | You need to know the answer to this question before you proceed. The | ||
34 | answer is pretty straightforward: what have you done in the past? If | ||
35 | you like all your Apache modules to be dynamic, then you should keep | ||
36 | doing that. If you're more of an old-school type and prefer to compile | ||
37 | the modules right into apache, do that. Both methods work equally | ||
38 | well. | ||
39 | |||
40 | |||
31 | Installation (as an Apache DSO) | 41 | Installation (as an Apache DSO) |
32 | =============================== | 42 | =============================== |
33 | 43 | ||
@@ -45,11 +55,19 @@ For folks interested in using this module as an Apache DSO: | |||
45 | fully explained in the Makefile. | 55 | fully explained in the Makefile. |
46 | 56 | ||
47 | 3) Instruct apxs to compile and install the module as a DSO. You need | 57 | 3) Instruct apxs to compile and install the module as a DSO. You need |
48 | to know two things before you run apxs: | 58 | to know three things before you run apxs: |
49 | - The location of the apxs binary, find using 'locate apxs' | 59 | - The location of the apxs binary, find using 'locate apxs' |
50 | - The location of your MySQL libraries, find using 'locate libmysqlclient' | 60 | - The location of your MySQL libraries, find using 'locate libmysqlclient' |
61 | - The location of your mysql.sock socket file. If your MySQL is running on | ||
62 | a different machine (in other words, communication is via TCP/IP and not | ||
63 | sockets), this value will be ignored BUT IT STILL MUST BE DEFINED | ||
64 | AS SOMETHING/ANYTHING FOR COMPILATION TO WORK. | ||
51 | 65 | ||
52 | # <path>/apxs -i -a -c -L<path to MySQL libs> -lmysqlclient -lz mod_log_mysql.c | 66 | FORMAT: |
67 | # <path>/apxs -i -c -DMYSQLSOCKET='\"/path/to/mysql.sock\"' -L/path/to/mysqllibs -lmysqlclient -lz mod_log_mysql.c | ||
68 | |||
69 | EXAMPLE: | ||
70 | # /usr/sbin/apxs -i -c -DMYSQLSOCKET='\"/var/lib/mysql/mysql.sock\"' -L/usr/lib/mysql -lmysqlclient -lz mod_log_mysql.c | ||
53 | 71 | ||
54 | You should see something like this: | 72 | You should see something like this: |
55 | 73 | ||
@@ -59,7 +77,20 @@ For folks interested in using this module as an Apache DSO: | |||
59 | chmod 755 <your path to Apache libexec>/mod_log_mysql.so | 77 | chmod 755 <your path to Apache libexec>/mod_log_mysql.so |
60 | [activating module blah in /path/to/apache/etc/httpd.conf] | 78 | [activating module blah in /path/to/apache/etc/httpd.conf] |
61 | 79 | ||
62 | 4) Now go to step (9) in the instructions below to configure httpd.conf... | 80 | 4) Add the following stanzas to your httpd.conf file. Put the second stanza |
81 | somewhere after the ClearModuleList directive. | ||
82 | |||
83 | <IfDefine HAVE_LOG_MYSQL> | ||
84 | LoadModule mysql_log_module modules/mod_log_mysql.so | ||
85 | </IfDefine> | ||
86 | |||
87 | |||
88 | <IfDefine HAVE_LOG_MYSQL> | ||
89 | AddModule mod_log_mysql.c | ||
90 | </IfDefine> | ||
91 | |||
92 | |||
93 | 5) Now go to step (9) in the instructions below to configure httpd.conf... | ||
63 | 94 | ||
64 | 95 | ||
65 | Installation (as a static module compiled into httpd) | 96 | Installation (as a static module compiled into httpd) |
@@ -143,14 +174,14 @@ Installation (as a static module compiled into httpd) | |||
143 | INSERTed into the table called "access_log". | 174 | INSERTed into the table called "access_log". |
144 | 175 | ||
145 | 176 | ||
146 | LogMySQLInfo dbmachine.foo.com loguser l0gger | 177 | MySQLLoginInfo dbmachine.foo.com loguser l0gger |
147 | LogMySQLDB apache | 178 | MySQLDatabase apache |
148 | 179 | ||
149 | <VirtualHost 1.2.3.4> | 180 | <VirtualHost 1.2.3.4> |
150 | [snip] | 181 | [snip] |
151 | 182 | ||
152 | TransferLogMySQLTable access_log | 183 | MySQLTransferLogTable access_log |
153 | TransferLogMySQLFormat huSUsbTvRA | 184 | MySQLTransferLogFormat huSUsbTvRA |
154 | 185 | ||
155 | [snip] | 186 | [snip] |
156 | </VirtualHost> | 187 | </VirtualHost> |
@@ -1,5 +1,5 @@ | |||
1 | # $Id: Makefile,v 1.5 2002/01/15 18:40:14 helios Exp $ | 1 | # $Id: Makefile,v 1.6 2002/02/24 20:17:16 helios Exp $ |
2 | MLMVERS = 1.13 | 2 | MLMVERS = 1.14 |
3 | 3 | ||
4 | # Where you unpacked your Apache tarball -- the source. | 4 | # Where you unpacked your Apache tarball -- the source. |
5 | APACHESOURCE = /usr/local/src/apache_1.3.22 | 5 | APACHESOURCE = /usr/local/src/apache_1.3.22 |
@@ -63,6 +63,8 @@ distro: all | |||
63 | cp -f README ${APACHEINST}/html/mod_log_mysql/ | 63 | cp -f README ${APACHEINST}/html/mod_log_mysql/ |
64 | cp -f CHANGELOG ${APACHEINST}/html/mod_log_mysql/ | 64 | cp -f CHANGELOG ${APACHEINST}/html/mod_log_mysql/ |
65 | cd ..; tar zcf mod_log_mysql-${MLMVERS}.tar.gz --exclude mod_log_mysql/CVS mod_log_mysql/; $(INSTALL) mod_log_mysql-${MLMVERS}.tar.gz ${APACHEINST}/html/mod_log_mysql/; rm -f mod_log_mysql-${MLMVERS}.tar.gz | 65 | cd ..; tar zcf mod_log_mysql-${MLMVERS}.tar.gz --exclude mod_log_mysql/CVS mod_log_mysql/; $(INSTALL) mod_log_mysql-${MLMVERS}.tar.gz ${APACHEINST}/html/mod_log_mysql/; rm -f mod_log_mysql-${MLMVERS}.tar.gz |
66 | 66 | rm -f /usr/local/Apache/html/mod_log_mysql/mod_log_mysql.tar.gz | |
67 | ln -s mod_log_mysql-1.14.tar.gz /usr/local/Apache/html/mod_log_mysql/mod_log_mysql.tar.gz | ||
68 | |||
67 | clean: | 69 | clean: |
68 | rm -f *.o *~ | 70 | rm -f *.o *~ |