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"
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"
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!