Using Apache is it possible to edit the Virtual Host to exclude a certain absolute path (such as /var/www/html/blog/wp-content/plugins/my_plugin/) from log to the ErrorLog file?

I need to stop it from log warnings like this:

PHP Warning:  Illegal offset type in isset or empty in /var/www/html/blog/wp-content/plugins/my_plugin/tool.php 

However I need to see other warnings, it's only about one file that's the reason why I would like to keep my php.ini unaltered.


That error message comes from php framework and mod_php, so the answer is no.

If you don't want to see them in httpd you will have to separate them (interpret php with php-fpm and proxy requests to it through mod_proxy_fcgi).

Apache httpd has no control over error messages generated by mod_php, so you do have to change php.ini or the above option, which I recommend (separation).

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.