error_log per Virtual Host?
To set the Apache (not the PHP) log, the easiest way to do this would be to do:
<VirtualHost IP:Port>
# Stuff,
# More Stuff,
ErrorLog /path/where/you/want/the/error.log
</VirtualHost>
If there is no leading "/" it is assumed to be relative.
Apache Error Log Page
Errors for virtual host are not written to specified ErrorLog, but to default error_log
This is (was?) a longstanding bug in mod_cgid
. Its status still is "RESOLVED LATER" which (apparently) means: "stop complaining - we'll do it in a later version, not now". Maybe it has been solved by now (your version, 2.2.22, is 3 years old), but I couldn't find any mention of it.
mod_cgid
is the default .cgi
handler in the threaded version of Apache. If you switch to mod_cgi
, e.g. by using a non-threaded apache (like I do) that should solve your problem.
WAMP virtual host error log location not working?
Change your definition of the log files to include the full path.
You might also like to add a seperate log file for the PHP error log.
ErrorLog "C:/wamp/logs/localhost-error.log"
CustomLog "C:/wamp/logs/localhost-access.log" common
php_value error_log "C:/wamp/logs/localhost.php.error.log"
and
ErrorLog "C:/wamp/logs/site.local-error.log"
CustomLog "C:/wamp/logs/site.local-access.log" common
php_value error_log "C:/wamp/logs/site.php.error.log"
How do you set the PHP error log location in the Apache configuration file?
From error_log per Virtual Host?:
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/domains/example.com/html
ErrorLog /var/www/domains/example.com/apache.error.log
CustomLog /var/www/domains/example.com/apache.access.log common
php_flag log_errors on
php_flag display_errors on
php_value error_reporting 2147483647
php_value error_log /var/www/domains/example.com/php.error.log
</VirtualHost>
Related Topics
What Is the Linux Equivalent to Dos Pause
Difference Between Pid and Tid
Pthread Mutex Lock Unlock by Different Threads
Linux Removing Folders Older Than 1 Year and More Than 3 Files
Create Zip File and Ignore Directory Structure
Converting Jiffies to Milli Seconds
Library Path When Dynamically Loaded
How to Execute Ssh-Keygen Without Prompt
Cannot Connect to X Server :0.0 with a Qt Application
Is It Ok to Use the Same Input File as Output of a Piped Command
How Pthread_Mutex_Lock Is Implemented
Search and Replace with Sed When Dots and Underscores Are Present
Bash Command Substitution on Remote Host
Should I Use Libc++ or Libstdc++
How to Add a Line of Text to the Middle of a File Using Bash