Configuring an Apache Server

This topic explains how to configure Apache Server on a Windows or UNIX/Linux system to send log messages to TLC.  

Apache Server on Windows

Apache Server on UNIX/Linux - Network Collector

Apache Server on UNIX/Linux - File Collector 

Apache Server on Windows

Firmware: 2.2

Collector: File Collector

To configure Apache Server on a Windows system to send log messages to TLC:

1. Open the Apache configuration file (httpd.conf). By default, this file is in the following directory:

C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf 

2. In the configuration file, change the LogLevel line as follows: 

LogLevel debug

Note 

If the debug LogLevel results in the collection of too many log messages, you can change this value to info, notice, warn, error, crit, alert, or emerg.

3. Save and close the configuration file.
4. At a command prompt, enter the following command to re-start the Apache service.

Net stop Apache2.2

Net start Apache2.2

Tip 

Apache2.2 is the default name of the Apache service. To determine if the name of your Apache service differs, review the list of services in Apache Server.

Next

If you are performing initial configuration of your TLC environment, see Configuring your TLC Environment.

Otherwise, see Adding a Monitored Asset for a new Log Source.

Tip 

If you define a schedule for collection of log messages from the Monitored Asset, enter the following paths in the File Collection tab of the Monitored Asset properties dialog (see Table 51):

C:\Program Files (x86)\Apache Software Foundation\Apache2.2\logs\access.log

C:\Program Files (x86)\Apache Software Foundation\Apache2.2\logs\error.log

Apache Server on UNIX/Linux - Network Collector

Firmware: 2.0.63 and 2.2

Collector: Network Collector - Syslog

To configure Apache Server on a UNIX/Linux system to send log messages to a Network Collector:

1. On the Apache server, configure the Syslog to send log messages to TLC (see Configuring a Syslog or Rsyslog Module).
2. Open the Apache configuration file (httpd.conf).

For Apache Server 2.0.63, this file is in the following directory:

/usr/pkg/etc/httpd/

For Apache Server 2.2, this file is in:

/usr/local/apache2/conf

3. Edit the Apache configuration file as follows.

Set the ErrorLog value to:

ErrorLog syslog:local7

(For Apache Server 2.0.63 only) Change the ErrorLog Directive lines as follows:

ErrorLog Directive Description: Location where the server will log errors Syntax: ErrorLog file-path|syslog[:facility] Default: ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2) Context: server config, virtual host Status: Core Module: Core

(For Apache Server 2.2 only) Change the LogLevel and CustomLog lines as follows:

LogLevel debug

CustomLog "|logger -t <syslog_process> -i -p local6.notice" combined

Where <syslog_process> is the name of the Apache process that sends log messages to Syslog.

Note 

If the debug LogLevel results in the collection of too many log messages, you can change this value to info, notice, warn, error, crit, alert, or emerg.

4. Save and close the configuration file.
5. At a command prompt, enter one of the following commands to re-start the httpd process.

For Apache Server 2.0.63, enter:

kill –HUP `cat /var/run/httpd.pid'

For Apache Server 2.2, enter:

/usr/local/apache2/bin/apachectl -k restart -f /usr/local/apache2/conf/httpd.conf

Next

If you are performing initial configuration of your TLC environment, see Configuring your TLC Environment.

Otherwise, see Adding a Monitored Asset for a new Log Source.

Apache Server on UNIX/Linux - File Collector 

Firmware: 2.0.63 and 2.2

Collector: File Collector

To configure Apache Server on a UNIX/Linux system to send log messages to a File Collector:

1. Open the Apache configuration file (httpd.conf).

For Apache Server 2.0.63, this file is in the following directory:

/usr/pkg/etc/httpd/

For Apache Server 2.2, this file is in:

/usr/local/apache2/conf

2. Edit the LogLevel line as follows:

LogLevel debug

3. Save and close the configuration file.
4. At a command prompt, enter one of the following commands to re-start the httpd process.

For Apache Server 2.0.63, enter:

kill –HUP `cat /var/run/httpd.pid'

For Apache Server 2.2, enter:

/usr/local/apache2/bin/apachectl -k restart -f /usr/local/apache2/conf/httpd.conf

Tip 

If you define a schedule for collection of log messages from the Monitored Asset, enter the following paths in the File Collection tab of the Monitored Asset properties dialog (see Table 51).

For Apache Server 2.0.63, enter:

/usr/pkg/etc/httpd/logs/access_log

/usr/pkg/etc/httpd/logs/error_log

For Apache Server 2.2, enter:

/usr/local/apache2/logs/access_log

/usr/local/apache2/logs/error_log

Next

If you are performing initial configuration of your TLC environment, see Configuring your TLC Environment.

Otherwise, see Adding a Monitored Asset for a new Log Source.