From the course: Apache Web Server: Administration

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Enabling and reading Apache log files

Enabling and reading Apache log files - Apache Tutorial

From the course: Apache Web Server: Administration

Start my 1-month free trial

Enabling and reading Apache log files

Apache error logs are configured with a couple of directives. The first, ErrorLog, defines the name and location. The file created is typically called error log or error.log. The next directive is LogLevel, which controls the verbosity, or detail, of the error logs. LogLevels are defined in the Apache documentation. At high level the default is warn but info can be a bit more verbose. The least verbose level is emergency which only logs when the system is unusable and on the other end of the spectrum you can go to stack traces which dump vast amounts of data useful only if you're actually developing Apache functionality. Most Apache servers are configured to log errors already. The trick is figuring out where it's logging to. Switch to the terminal. Let's use grep to recursively and case insensitively search the configuration files for error log. So we're going to look for ErrorLog in etc apache2. The main ErrorLog is defined as APACHE_LOG_DIR/error.log. This is an environmental…

Contents