Home > Operation and Maintenance > Apache > How to find custom error logs

How to find custom error logs

王林
Release: 2020-07-02 17:59:37
forward
2739 people have browsed it

How to find custom error logs

Customized error log

(Recommended tutorial: apache from entry to proficiency)

If we want to find the custom error log location, open /etc/apache2/apache2.conf with a text editor, and then look for the line starting with ErrorLog, which specifies the location of the custom Apache error log file.

For example, the following line can be found in the unmodified Apache configuration file:

ErrorLog ${APACHE_LOG_DIR}/error.log
Copy after login

This location is configured using the APACHELOGDIR environment variable, which has been used in /etc/apache2/envvars definition.

export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
Copy after login

In actual situations, ErrorLog may point to any path in your Linux system.

Use virtual host custom error log

If a virtual host is used in the Apache web server, the ErrorLog directive may be specified within the virtual host container, here In this case, the system-wide error log location mentioned above will be ignored.

After virtual hosts are enabled, each virtual host can define its own custom error log location. To find out the location of the error log for a specific virtual host, you can open /etc/apache2/sites-enabled/.conf and look for the ErrorLog directive, which displays the site-specific error log file.

The above is the detailed content of How to find custom error logs. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template