Language Selection

English French German Italian Portuguese Spanish

Troubleshooting with Apache logging

Filed under

The Apache Web server (Apache) comes with a powerful logging framework. In the default configuration, Apache logs all errors to an error log and all access requests to an access log. The default level of logging is sufficient for analyzing traffic patterns and for getting basic information about errors, but it may be inadequate for troubleshooting purposes. Familiarity with all the logging features can help you troubleshoot the Web server or applications hosted on Apache.

In the default installation of Apache on Fedora, you can find the access log at /etc/httpd/logs/access_log and the error log at /etc/httpd/logs/error_log. The access log captures one line of information for each request. The error log captures the date and time of a request, the severity level of an event, the client's IP address, and the description of the error. Error logging is a part of the core functionality of Apache, while other bits in the logging functionality come from modules such as mod_log_config, mod_dumpio, and mod_log_forensic.

You can customize the format of access log by using the configuration directive LogFormat in the configuration file httpd.conf (in /etc/httpd/conf directory on Fedora).

For instance,

More in Tux Machines

Security: MuddyWater, DJI, Updates, Reproducible Builds and Excel

today's howtos

Android Leftovers

7 tools for analyzing performance in Linux with bcc/BPF

A new technology has arrived in Linux that can provide sysadmins and developers with a large number of new tools and dashboards for performance analysis and troubleshooting. It's called the enhanced Berkeley Packet Filter (eBPF, or just BPF), although these enhancements weren't developed in Berkeley, they operate on much more than just packets, and they do much more than just filtering. I'll discuss one way to use BPF on the Fedora and Red Hat family of Linux distributions, demonstrating on Fedora 26. BPF can run user-defined sandboxed programs in the kernel to add new custom capabilities instantly. It's like adding superpowers to Linux, on demand. Examples of what you can use it for include: Read more