381 lines
7.0 KiB
HTML
381 lines
7.0 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Configure the /etc/webalizer.conf file</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.60"><LINK
|
|
REL="HOME"
|
|
TITLE="Securing and Optimizing Linux"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="Optional component to install with Apache"
|
|
HREF="opt-Apache.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Compile"
|
|
HREF="chap29sec263.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Make Apache aware of Webalizer output directory"
|
|
HREF="chap29sec266.html"></HEAD
|
|
><BODY
|
|
CLASS="section"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Securing and Optimizing Linux: RedHat Edition -A Hands on Guide</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="chap29sec263.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 30. Optional component to install with Apache</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="chap29sec266.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="section"
|
|
><H1
|
|
CLASS="section"
|
|
><A
|
|
NAME="AEN21018"
|
|
>30.3. Configure the <TT
|
|
CLASS="filename"
|
|
>/etc/webalizer.conf</TT
|
|
> file</A
|
|
></H1
|
|
><P
|
|
> The <TT
|
|
CLASS="filename"
|
|
>/etc/webalizer.conf</TT
|
|
> is the default configuration file for Webalizer. With it, you can specify which directories or pages in your web site to analyze, which <SPAN
|
|
CLASS="acronym"
|
|
>URL</SPAN
|
|
>s to hide, and so on. By default,
|
|
the Webalizer program will install a sample configuration file named <TT
|
|
CLASS="filename"
|
|
>webalizer.conf.sample</TT
|
|
> under the <TT
|
|
CLASS="filename"
|
|
>/etc/</TT
|
|
> directory of Linux. You can use this file to configure your choices and
|
|
then rename it <TT
|
|
CLASS="filename"
|
|
>webalizer.conf</TT
|
|
>, and the Webalizer program will be able to find and use it. A lot of options exist and it's important to read the documentation that comes with Webalizer for more information on all of
|
|
the different setting and parameters. Also, it's important to note that we comment in this Webalizer configuration file only the most common and used parameters.
|
|
</P
|
|
><P
|
|
> Edit the <TT
|
|
CLASS="filename"
|
|
>webalizer.conf.sample</TT
|
|
> file, <B
|
|
CLASS="command"
|
|
>vi</B
|
|
> <TT
|
|
CLASS="filename"
|
|
>/etc/webalizer.conf.sample</TT
|
|
> or create the <TT
|
|
CLASS="filename"
|
|
>webalizer.conf</TT
|
|
> file, <B
|
|
CLASS="command"
|
|
>touch</B
|
|
> <TT
|
|
CLASS="filename"
|
|
>/etc/webalizer.conf</TT
|
|
>
|
|
and add/change in this file:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> LogFile /var/log/httpd/access_log
|
|
OutputDir /home/httpd/usage
|
|
Incremental yes
|
|
PageType htm*
|
|
PageType cgi
|
|
PageType php
|
|
HideURL *.gif
|
|
HideURL *.GIF
|
|
HideURL *.jpg
|
|
HideURL *.JPG
|
|
HideURL *.ra
|
|
IgnoreURL /taskbar*
|
|
</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
><P
|
|
> This tells the <TT
|
|
CLASS="filename"
|
|
>webalizer.conf</TT
|
|
> file to set itself up for this particular configuration setup with:
|
|
</P
|
|
><DIV
|
|
CLASS="glosslist"
|
|
><DL
|
|
><DT
|
|
><B
|
|
><TT
|
|
CLASS="envar"
|
|
>LogFile</TT
|
|
> <TT
|
|
CLASS="filename"
|
|
>/var/log/httpd/access_log</TT
|
|
></B
|
|
></DT
|
|
><DD
|
|
><P
|
|
> The option <TT
|
|
CLASS="envar"
|
|
>LogFile</TT
|
|
> specifies the logfile to use with Webalizer. The default log file is supposed to be the <TT
|
|
CLASS="filename"
|
|
>access_log</TT
|
|
> of Apache Web Server, but you can specifies a different one,
|
|
like the one Squid Proxy Server makes named <TT
|
|
CLASS="filename"
|
|
>access.log</TT
|
|
> if you use it in httpd-accelerator mode. See, <A
|
|
HREF="netproxy-squid.html"
|
|
>Software -Server/Proxy Network</A
|
|
>, for more information.
|
|
</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
><TT
|
|
CLASS="envar"
|
|
>OutputDir</TT
|
|
> <TT
|
|
CLASS="filename"
|
|
>/home/httpd/usage</TT
|
|
></B
|
|
></DT
|
|
><DD
|
|
><P
|
|
> The option <TT
|
|
CLASS="envar"
|
|
>OutputDir</TT
|
|
> specifies the location of the output directory to use for the reports of Webalizer. All present and future report files generated by the Webalizer program will be hosted in this directory.
|
|
It is recommended that you create this directory where your Apache web site resides.
|
|
</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
><TT
|
|
CLASS="envar"
|
|
>Incremental yes</TT
|
|
></B
|
|
></DT
|
|
><DD
|
|
><P
|
|
> The option <TT
|
|
CLASS="envar"
|
|
>Incremental</TT
|
|
> if set to <TT
|
|
CLASS="envar"
|
|
>Yes</TT
|
|
> tells the program only to process partial logs file, and allows you to rotate your log files as much as you want without the loss of access information. It's
|
|
recommended to set this option to <TT
|
|
CLASS="envar"
|
|
>Yes</TT
|
|
>.
|
|
</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
><TT
|
|
CLASS="envar"
|
|
>PageType htm* cgi php</TT
|
|
></B
|
|
></DT
|
|
><DD
|
|
><P
|
|
> The option <TT
|
|
CLASS="envar"
|
|
>PageType</TT
|
|
> specifies what file extensions you want Webalizer to consider as a page to count. Each added file extensions must be specified on its own line as shown in the Webalizer configuration file above.
|
|
</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
><TT
|
|
CLASS="envar"
|
|
>HideURL *.gif *.GIF *.jpg *.JPG *.ra</TT
|
|
></B
|
|
></DT
|
|
><DD
|
|
><P
|
|
> The option <TT
|
|
CLASS="envar"
|
|
>HideURL</TT
|
|
> specifies what kind of items such as graphic files, audio files or other <TT
|
|
CLASS="literal"
|
|
>non-html</TT
|
|
> files to hide from the reports page. Each added item must be specified on its own line as
|
|
shown in the Webalizer configuration file above.
|
|
</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
><TT
|
|
CLASS="envar"
|
|
>IgnoreURL /taskbar*</TT
|
|
></B
|
|
></DT
|
|
><DD
|
|
><P
|
|
> The option <TT
|
|
CLASS="envar"
|
|
>IgnoreURL</TT
|
|
> specifies <SPAN
|
|
CLASS="acronym"
|
|
>URL</SPAN
|
|
>s to be completely ignored from the generated statistics reports. This option can be used to ignore directories that are not important in our statistics reports. It's
|
|
also useful when you want to manage and class which <SPAN
|
|
CLASS="acronym"
|
|
>URL</SPAN
|
|
>s should be monitored and which should be ignored.
|
|
</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
><DIV
|
|
CLASS="caution"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="caution"
|
|
BORDER="1"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
ALIGN="CENTER"
|
|
><B
|
|
><SPAN
|
|
CLASS="inlinemediaobject"
|
|
><IMG
|
|
SRC="./images/Caution.gif"
|
|
ALT="Caution"
|
|
></IMG
|
|
></SPAN
|
|
></B
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
><P
|
|
> If you decide to use the existent <TT
|
|
CLASS="filename"
|
|
>/etc/webalizer.conf.sample</TT
|
|
> file to configure your parameters for Webalizer, don't forget to rename it <TT
|
|
CLASS="filename"
|
|
>webalizer.conf</TT
|
|
> or the program will be unable to
|
|
use it.
|
|
</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="chap29sec263.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="chap29sec266.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Compile</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="opt-Apache.html"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Make Apache aware of Webalizer output directory</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |