For single website setup, look for php directives
error_log = filename - location of error log
error_reporting = something here - how much robustness do you want?
On our moodle servers, we are hosting multiple sites, which means using the Apache directive Vhost to specify the name and location of the error log. I am sending the access logs to a separate folder that the error logs.
Each Vhost definition in the httpd-vhosts.conf file contains these two lines:
CustomLog "C:\logs\access\entityName_access.log" common
ErrorLog "C:\logs\EntityName_error.log"
These directives are of particular interest to me, since they hold the keys to solving mysterious web server reporting and behavior!
A couple observations about the main Apache configuration file httpd-conf.
It takes a modular approach to its many directives and settings. I think in the earlier days of Apache, the settings all lived in the this main file. As new features and directives evolved, their inclusion became more modular.
Even with the Vhost directive active, and many web sites living on a server, there is still just one version of Apache supporting them all, most of the directives are server wide, global to all of the websites defined in the httpd-vhosts.conf file. Global Apache settings include
Port
ServerRoot
ServerAdmin email
ServerName
DocumentRoot
ErrorLog
This is copied from the httpd.conf file
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a
# container, that host's errors will be logged there and not here.
#
# ErrorLog "logs/error.log"
I noticed the ErrorLog directive was enabled, when it did not have to be, since I am using '
I like your post as I am a Dedicated PHP Developers and it will help me while I am doing my work.
ReplyDeleteOffshore PHP Developers