Sunday, December 8, 2013

service httpd status -gives error

[/usr/local/apache/htdocs]# 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
=======

check /usr/local/apache/logs/error_log

it will an error related to mod securtiy,

  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 "UqQ875BMiIUAADoOG6IAAAAC"]


white list the rule globally in modsec2.user.conf 

If you have cmc installed with cpanel then you can do it graphically.Otherwise you will have to do it in terminal and restart apache service.