1

Httpd プラグインを設定しようとしています

403 エラーが表示されます。この問題を解決する方法を提案してください

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
4

1 に答える 1

1

次の行を /etc/httpd/conf/httpd.conf の最後に追加してください。私のように別のファイルに入れたい場合は、/etc/httpd/ conf.d/status.confなどのファイルを作成して、それらをそこに。

ExtendedStatus On

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>

これは、/server-status uri でサーバーの状態を公開したいということです。また、127.0.0.1 からの接続のみを許可します。これは、サーバーから直接行われた要求からのみこのページをサーバーすることを許可していることを意味します。

変更を行ったら、必ず次を実行してください。

service httpd restart

次に、システム構成に応じて次のいずれかを実行して、機能していることを検証できます。

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
于 2015-01-10T23:04:20.993 に答える