1

I am using Apache 2.4 on my server and I want to be able to have a separate error log file for CGI scripts, similar to how I have a separate log file for PHP errors.

Currently, I am using the following rules my virtual host config to have an Apache access log, an Apache error log, and a PHP error log:

CustomLog /home/ubuntu/www/.logs/access.log combined
ErrorLog /home/ubuntu/www/.logs/error.log
php_value error_log /home/ubuntu/www/.logs/php.error.log

What would I have to add or change to get Apache to write CGI errors to its own file? Currently Apache is writing CGI errors to the error.log file.

I tried the following, but it did not change Apache's behavior.

ScriptLog /home/ubuntu/www/.logs/cgi.error.log
1
  • take a look at php.ini, and you will propably find it there – Orphans Dec 27 '16 at 7:15
0

Try ScriptLog with a different directory, and give it permissions to the apache unpriviledged user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.