ozzieonline

Well-Known Member
Dec 20, 2012
126
0
16
cPanel Access Level
Root Administrator
Hello,

If a file is not found on my server, or when a forbidden request is made, this is logged in the Apache log. Apache will try to load the corresponding ErrorDocument... which is not in my root folder. I don't want to use custom error documents because eventually I will handle everything from within my framework.

I would like to know how I can stop Apache from requesting ErrorDocuments so my log won't be filled with error messages.

I found this file: /usr/local/apache/conf/includes/errordocument.conf

It contains the locations to the error documents. If I empty this file will my problem be solved then? Or will the file be overwritten when Apache is updated? If this is not a good solution, is there a better one?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
I would like to know how I can stop Apache from requesting ErrorDocuments so my log won't be filled with error messages.

I found this file: /usr/local/apache/conf/includes/errordocument.conf

It contains the locations to the error documents. If I empty this file will my problem be solved then? Or will the file be overwritten when Apache is updated? If this is not a good solution, is there a better one?
You can edit the file /usr/local/apache/conf/includes/errordocument.conf
and modify it like this:

Code:
ErrorDocument 403 "Sorry can't allow you access today"
meaning that instead of loading a file Apache is showing that message.

If that file is overwritten by EasyApache you can do those changes in "Pre VirtualHost Include":
Service Configuration-> Apache Configuration-> Include Editor-> Pre VirtualHost Include-> All versions.