nimonogi

Member
Mar 11, 2011
21
0
51
Hello,

I'm getting the following error in every account that have ErrorDocument declared in .htaccess

Title: 500 Internal Server Error
--------------------
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster [at] domain [dot] com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
-----------------------

When i comment out ErrorDocument from .htaccess the websites are working fine.

Any thoughts on what misconfiguration causing this error server-wide?

Thanks in advance.
 

nimonogi

Member
Mar 11, 2011
21
0
51
Ex. ErrorDocument 404 /404.shtml

[Fri Mar 11 04:43:25 2011] [error] [client 11.111.11.111] ModSecurity: Access denied with code 501 (phase 2). Match of "rx ^((?:(?:POS|GE)T|OPTIONS|HEAD))$" against "REQUEST_METHOD" required. [file "/usr/local/apache/conf/modsec2.user.conf"] [line "41"] [id "960032"] [msg "Method is not allowed by policy"] [severity "CRITICAL"] [tag "POLICY/METHOD_NOT_ALLOWED"] [hostname "host.domain.com"] [uri "/"] [unique_id "TXmobW17ebMAABglWF0AAAAH"]
[Fri Mar 11 07:31:08 2011] [alert] [client 11.111.11.111] /home/user/public_html/.htaccess: ErrorDocument not allowed here, referer: http://host.domain.com:2086/scripts4/listaccts
[Fri Mar 11 09:35:16 2011] [error] [client 11.111.11.111] File does not exist: /home/user/public_html/favicon.ico
[Fri Mar 11 09:35:16 2011] [error] [client 11.111.11.111] File does not exist: /home/user/public_html/404.shtml
[Fri Mar 11 09:36:11 2011] [alert] [client 11.111.11.111] /home/user/public_html/.htaccess: ErrorDocument not allowed here
Is this caused by mod_security?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
42
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
It would appear to be caused by mod_security from what it is stating. You would want to check the /usr/local/apache/conf/modsec2.user.conf file for line 41 to check for matches.
 

nimonogi

Member
Mar 11, 2011
21
0
51
This was probably due to misconfiguration of mod_security.
Invalid command 'SecFilterEngine', perhaps misspelled or defined by a module not included in the server configuration.