Home > Operation and Maintenance > Apache > Where is the apache error log on centos?

Where is the apache error log on centos?

王林
Release: 2020-06-16 17:14:03
forward
4291 people have browsed it

Where is the apache error log on centos?

Apache error log location on CentOS

Default error log

In Red Hat-based Linux, the system By default, scoped Apache error log files are placed in /var/log/httpd/error_log. This default location can be customized by modifying the Apache configuration file.

Customized Error Log

To find the custom location of the Apache error log, open /etc/httpd/conf/httpd.conf with a text editor , and then look for ServerRoot, which shows the top level of the Apache web server directory tree where log files and configuration are located. For example:

ServerRoot "/etc/httpd"
Copy after login

Now, look for the line starting with ErrorLog, which indicates where the Apache web server writes the error log. Note that the location specified is relative to the ServerRoot value. For example:

ErrorLog "log/error_log"
Copy after login

Combine the above two instructions to get the complete error log path. By default, the path is /etc/httpd/logs/errorlog. In a fresh installation of Apache, this is a symbolic link to /var/log/httpd/errorlog.

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

Recommended tutorial: apache from entry to proficiency

The above is the detailed content of Where is the apache error log on centos?. 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