[Mod_gzip] handlers and missing directories
mod_gzip@lists.over.net
mod_gzip@lists.over.net
Tue, 1 Apr 2003 02:24:37 EST
--part1_169.1c8b7b39.2bba98b5_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Hello Gareth...
Whoops...
I typed those 'CustomLog' samples I posted a while ago
too fast and messed them up. They are not totally
accurate.
The 'names' don't match
The idea is that you can create any kind of 'CustomLog' entry
you want for your Apache and include any valid Apache log
token in any order but you have to give a 'name' to the
'LogFormat' line and then you have to use this same 'name'
in a 'CustomLog' entry for the new log format to become 'active'.
The samples I posted earlier were using 2 different 'names'.
The LogFormat string was naming itself 'full_plus_gzip' but
then I was using the default name 'common_with_mod_gzip_info2'
in the 'CustomLog' line. This won't work.
Should have been more like this...
For full 'common' log info PLUS User-Agent string PLUS
'Referer' header field value PLUS full mod_gzip statistics
added the end of the 'normal' log line... use this...
LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip: %{mod_gzip_result}n
In:%{mod_gzip_input_size}n
Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct."
common_with_mod_gzip_info2LogFormat "%h %l %u %t \"%r\" %>s %b
\"%{Referer}i\" \"%{User-Agent}i\" mod_gzip:
%{mod_gzip_compression_ratio}npct."
common_with_mod_gzip_info2
CustomLog /var/log/apache/detailed_httpd.log common_with_mod_gzip_info2
There has to be a 'space' at the end of the 'LogFormat' line before the
'name' common_with_mod_gzip_info2.
When you 'declare' this new log you can use the new format for
the regular Apache log or create a new log name like 'detailed_httpd.log'.
LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip: %{mod_gzip_result}n
common_with_mod_gzip_info2
CustomLog /var/log/apache/detailed_httpd.log common_with_mod_gzip_info2
Sorry about the previous typos.
For more about how all this works just see the standard
Apache documentation regarding 'LogFormat' and 'CustomLog'
directives.
--part1_169.1c8b7b39.2bba98b5_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
<HTML><FONT FACE=3Darial,helvetica><FONT SIZE=3D2 FAMILY=3D"SANSSERIF" FACE=
=3D"Arial" LANG=3D"0"><BR>
Hello Gareth...<BR>
<BR>
Whoops...<BR>
<BR>
I typed those 'CustomLog' samples I posted a while ago <BR>
too fast and messed them up. They are not totally <BR>
accurate.<BR>
<BR>
The 'names' don't match<BR>
<BR>
The idea is that you can create any kind of 'CustomLog' entry<BR>
you want for your Apache and include any valid Apache log<BR>
token in any order but you have to give a 'name' to the<BR>
'LogFormat' line and then you have to use this same 'name'<BR>
in a 'CustomLog' entry for the new log format to become 'active'.<BR>
<BR>
The samples I posted earlier were using 2 different 'names'.<BR>
The LogFormat string was naming itself 'full_plus_gzip' but<BR>
then I was using the default name 'common_with_mod_gzip_info2'<BR>
in the 'CustomLog' line. This won't work.<BR>
<BR>
Should have been more like this...<BR>
<BR>
For full 'common' log info PLUS User-Agent string PLUS<BR>
'Referer' header field value PLUS full mod_gzip statistics<BR>
added the end of the 'normal' log line... use this...<BR>
<BR>
LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip: %{mod_gzip_result}n In:%{m=
od_gzip_input_size}n Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_rat=
io}npct." common_with_mod_gzip_info2LogFormat "%h %l %u %t \"%r\" %>s %b=20=
\"%{Referer}i\" \"%{User-Agent}i\" mod_gzip: %{mod_gzip_compression_ratio}np=
ct." <BR>
common_with_mod_gzip_info2<BR>
<BR>
CustomLog /var/log/apache/detailed_httpd.log common_with_mod_gzip_info2<BR>
<BR>
There has to be a 'space' at the end of the 'LogFormat' line before the<BR>
'name' common_with_mod_gzip_info2.<BR>
<BR>
When you 'declare' this new log you can use the new format for<BR>
the regular Apache log or create a new log name like 'detailed_httpd.log'.<B=
R>
<BR>
LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip: %{mod_gzip_result}n </FONT=
><FONT COLOR=3D"#808080" style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D2 FAMIL=
Y=3D"SANSSERIF" FACE=3D"Tahoma" LANG=3D"0"><BR>
</FONT><FONT COLOR=3D"#000000" style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D2=
FAMILY=3D"SANSSERIF" FACE=3D"Arial" LANG=3D"0">common_with_mod_gzip_info2<B=
R>
<BR>
CustomLog /var/log/apache/detailed_httpd.log common_with_mod_gzip_info2</FON=
T><FONT COLOR=3D"#808080" style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D2 FAMI=
LY=3D"SANSSERIF" FACE=3D"Tahoma" LANG=3D"0"><BR>
</FONT><FONT COLOR=3D"#000000" style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D2=
FAMILY=3D"SANSSERIF" FACE=3D"Arial" LANG=3D"0"><BR>
Sorry about the previous typos.<BR>
<BR>
For more about how all this works just see the standard<BR>
Apache documentation regarding 'LogFormat' and 'CustomLog'<BR>
directives.<BR>
<BR>
</FONT></HTML>
--part1_169.1c8b7b39.2bba98b5_boundary--