Issue: I got the “Not Acceptable” error while checking the status of apache.
root[~]# service httpd status
Not Acceptable
An appropriate representation of the requested resource
/whm-server-status could not be found on this server.
Additionally, a 404 Not Found error was encountered while trying to use
an ErrorDocument to handle the request.
Solution :
Please check the Apache error log using the following command.
# grep "/whm-server-status" error_log
You will get an outpute like pasted below
--------------------
root@server10001 [/usr/local/apache/logs]# grep "/whm-server-status" error_log
[Wed Jan 29 17:42:57 2014] [error] [client ::1] ModSecurity: Access denied with code 406 (phase 2). Match of "rx ^apache.*perl" against "REQUEST_HEADERS:User-Agent" required. [file "/usr/local/apache/conf/modsec2.user.conf"] [line "58"] [id "1234123429"] [msg "Request Indicates an automated program explored the site"] [severity "NOTICE"] [hostname "localhost"] [uri "/whm-server-status"] [unique_id "UujwSVOqdYoAAAs9DEAAAAAB"]
---------------------
The output clearly shows, whm-server-status was blocked by modesec rule at line “58″ and id “1234123429″ on /usr/local/apache/conf/modsec2.user.conf file.
Now, Please open the modsec file using the command pasted below.
# vi /usr/local/apache/conf/modsec2.user.conf
Then comment the lines using the "#" symbol as pasted below.
------------------
#SecRule REQUEST_HEADERS:User-Agent "(?:\b(?:(?:indy librar|snoop)y|microsoft url control|lynx)\b|d(?:ownload demon|isco)|w(?:3mirror|get)|l(?:ibwww|wp)|p(?:avuk|erl)$
# "chain,log,auditlog,msg:'Request Indicates an automated program explored the site',id:'1234123429',severity:'5'"
#SecRule REQUEST_HEADERS:User-Agent "!^apache.*perl"
--------------------
Please check the status of Apache now.
That's all..........!!!
Recent Comments