LoginSignup
1
1

More than 5 years have passed since last update.

Icinga webでのエラー対応

Posted at

この通りにやったら以下のエラーメッセージが表示された。

-> 500 internal server error!

=== Error ===
Uncaught exception AgaviException thrown!

=== Message ===
You are running the Apache HTTP Server with a |ServerTokens| configuration directive value of |Minor| or lower.
This directive controls the amount of version information Apache exposes about itself.
Agavi needs detailed Apache version information to apply URL decoding and parsing workarounds specific to certain versions of Apache that exhibit buggy behavior.

Please take one of the following measures to fix this problem:
- raise your |ServerTokens| level to |Min| or higher in httpd.conf
- set a static value for the request source |SERVER_SOFTWARE| in factories.xml (for your environment)
- set a value for $_SERVER[|SERVER_SOFTWARE|], e.g. in your pub/index.php

For detailed instructions and examples on fixing this problem, especially for the factories.xml method which is recommended in case you do not have control over your server|s httpd.conf, please refer to:
http://trac.agavi.org/ticket/1029

For more information on the |ServerTokens| directive, please refer to:
http://httpd.apache.org/docs/2.2/en/mod/core.html#servertokens

For your reference, your SERVER_SOFTWARE string is currently |Apache|.

=== Stacktrace ===
#0 /var/cache/icinga-web/config/factories.xml_production_web_3b046d81eca933d9f16b3365d9ddd13114979325.php(63): AgaviWebRequest->initialize(Object(AppKitAgaviContext), Array)
#1 /var/cache/icinga-web/config/compile.xml_production__d41bc4e7416d79a2859fb497054ab4f5308e2df1.php(384): include(|/var/cache/icin...|)
#2 /var/cache/icinga-web/config/compile.xml_production__d41bc4e7416d79a2859fb497054ab4f5308e2df1.php(3549): AgaviContext->initialize()
#3 /var/cache/icinga-web/config/compile.xml_production__d41bc4e7416d79a2859fb497054ab4f5308e2df1.php(370): AppKitAgaviContext->initialize()
#4 /usr/share/icinga-web/pub/index.php(51): AgaviContext::getInstance(|web|)
#5 {main}

ApcheのServerTokensprodになっており、SERVER_SOFTWAREApacheしか取得できないためにエラーになっているようです。
ServerTokensを変更するのはセキュリティ的にしたくないので、スクリプトに直接指定して対応しました。

/usr/share/icinga-web/pub/index.php
<?php
$_SERVER["SERVER_SOFTWARE"] = "Apache 2.2";

/**
 * Allow XHR access from other domains (response for cors preflight requests)
 */
...
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1