新安裝的 icinga-web 遇到問題,當瀏覽 xxxx/icinga-web 時出現錯誤
-> 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 /usr/local/icinga/web/app/cache/config/factories.xml_production_web_34f8b7be1c4c73304472e7a6a96c82f580e4415d.php(63): AgaviWebRequest->initialize(Object(AppKitAgaviContext), Array) #1 /usr/local/icinga/web/app/cache/config/compile.xml_production__7e1d0f4dbbaa70f3027798d2fdc10d582f9ad3f7.php(384): include('/usr/local/icin...') #2 /usr/local/icinga/web/app/cache/config/compile.xml_production__7e1d0f4dbbaa70f3027798d2fdc10d582f9ad3f7.php(3549): AgaviContext->initialize() #3 /usr/local/icinga/web/app/cache/config/compile.xml_production__7e1d0f4dbbaa70f3027798d2fdc10d582f9ad3f7.php(370): AppKitAgaviContext->initialize() #4 /usr/local/icinga/web/pub/index.php(49): AgaviContext::getInstance('web') #5 {main}
參考 https://github.com/agavi/agavi/issues/1029 解決方法
在 app/config/factories.xml 加入你的 apache 版本 (最後一行 的前面 )
# (以上省略) # -- 以下加入 -- <ae:configuration context="web" environment="production"> <request class="AgaviWebRequest"> <ae:parameter name="sources"> <ae:parameter name="SERVER_SOFTWARE">Apache/2.2.15 </ae:parameter> </request> </ae:configuration> # -- 以上加入 -- </ae:configurations>
留言