Reputation: 11
I am trying to configure Httpd Plugin
I am getting 403 error , any suggestions how to fix this issue
INFO 2014-12-16 19:52:14,885 14962 MainProcess MainThread newrelic_plugin_agent.agent __init__ L55 : Agent v1.3.0 initialized, Linux-2.6.32-431.29.2.el6.x86_64-x86_64-with-glibc2.2.5 (CentOS 6.5 Final) CPython v2.6.6
INFO 2014-12-16 19:52:14,886 14962 MainProcess MainThread helper.controller run L251 : newrelic-plugin-agent v2.4.1 started
INFO 2014-12-16 19:52:14,886 14962 MainProcess MainThread newrelic_plugin_agent.agent start_plugin_polling L263 : Enabling plugin: apache_httpd
ERROR 2014-12-16 19:52:19,450 14962 MainProcess MainThread newrelic_plugin_agent.plugins.base http_get L354 : Error response from localhost:80/server-status?auto (403):
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /server-status
on this server.</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at localhost Port 80</address>
</body></html>
ERROR 2014-12-16 19:52:19,451 14962 MainProcess MainThread newrelic_plugin_agent.plugins.apache_httpd error_message L61 : Could not match any of the stats, please make ensure Apache HTTPd is configured correctly. If you report this as a bug, please include the full output of the status page from localhost:80/server-status?auto in your ticket
WARNING 2014-12-16 19:52:19,451 14962 MainProcess MainThread newrelic_plugin_agent.agent send_components L217 : No metrics to send to NewRelic this interval
INFO 2014-12-16 19:52:19,451 14962 MainProcess MainThread newrelic_plugin_agent.agent process L133 : Stats processed in 4.57 seconds, next wake in 55 seconds
Upvotes: 1
Views: 606
Reputation: 2877
Add the following lines to the end of /etc/httpd/conf/httpd.conf if you prefer it in a separate file as I do, then create a file such as /etc/httpd/conf.d/status.conf and put them in there.
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
This is saying that you want to expose the server status on the /server-status uri. It also will only allow connections from 127.0.0.1, which means you are only allowing to server this page from requests made directly from the server.
Once you've made the change, make sure you run:
service httpd restart
you can then validate that it's working by doing any of the following depending on your system configuration.
lynx --dump http://127.0.0.1/server-status
curl -vs http://127.0.0.1/server-status
wget -qO- http://127.0.0.1/server-status
Upvotes: 1