Pages

Thursday, July 30, 2009

Installing module in httpd apache on Linux

We can implement logging option at apache-httpd level to keep record of request and response byte count.
To implement logging modules mod_logio and mod_log_config in to existing httpd, we need to upgrade existing apache by yum update . This 'll automatically install all modules needed by httpd. httpd.conf default logger need to be changes as follows

Procedure to follow :

First check whether mod_log_config module is installed on apache using command
httpd -l
if its present go ahead for installing mod_logio module
if not present install mod_log_config using following method ( change mod_logio.c to mod_log_config.c )

1. Copy the apache-httpd source to /usr/local ( if its not available)

2. Add module mod_logio.c to existing apache-httpd using following commads.
apxs -c $httpd-2.2.3/modules/loggers/mod_logio.c
apxs -i -a -n mod_logio $httpd-2.2.3/modules/loggers/mod_logio.la

3. Load shared object files needed.
ldconfig

This 'll add below line in file /etc/httpd/conf/httpd.conf
LoadModule logio_module lib/apache/mod_logio.so

4. Log format in /etc/httpd/conf/httpd.conf
By default ( something like this ):
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
should be changed to ( %I %O should be appended ) :
LogFormat "%h %l %u %t \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-agent}i\" %I %O" combined

5. restart apache-httpd
6. Check for access logs for change

We need to make sure while installing new httpd we should use these options to get request , response bytes.
./configure --enable-layout=RedHat --enable-auth-digest --enable-deflate --enable-proxy --enable-rewrite --enable-so --enable-status --enable-info --enable-logio

Its advisable to try the same on local machine before trying out on live server.
Let me know if in issue while installing/upgrading... 

Monday, July 6, 2009

must read...(humor)

good one :-)




At work, Raman and Narayan were chatting:

Raman: Narayan, I've been attending night classes for 5 months now and I have an exam next week.

Narayan: oh!

Raman: For example, do you know who is Graham Bell?

Narayan: No

Raman: He's the inventor of the phone in 1876; if you take night Courses you would know this.

The next day, the same discussion took place:

Raman: Do you know who Alexander Dumas is?

Narayan: No

Raman: He's the author of "The 3 Musketeers", if you take night courses, you would know this.


The next day, once again:

Raman: And do you know who Jean Jacques Rousseau is?

Narayan: No

Raman: He's the author of "Confessions" , if you take night courses, you would know this.

This time, Nac rayan got irritated and said: And you, do you know who is Balakrishnan Kuppuswamy?

Raman: No

Narayan: He's the guy roaming with your wife!! If you stop night courses, you would know.

Rule: There are some things more important in life than Work n General Knowledge


 




--
Regards,
Mahen