StatusWolf 0.8.8 GUI问题:在Apache访问日志中findURLpath中的“/ undefined /”

我在Ubuntu 12.04上安装了StatusWolf 0.8.8,运行Apache 2.2.22和PHP 5.4.23。

我使用以下方法检索了最新的Git源代码:

git clone https://github.com/box/StatusWolf.git 

并遵循这里的安装说明:

https://github.com/box/StatusWolf/wiki/Installation

我可以login,但无法创build任何graphics。 在调查的过程中,我发现Apache日志中的URLpath中有“/ undefined /”。 例如,当我login时,selectDashboard,然后select菜单项Dashboard / Add Widget / Graphing Widget,会生成以下Apache访问日志条目:

 192.168.100.110:9653 192.168.100.102 - - [08/Jan/2014:13:27:09 -0800] "POST /undefined/api/get_saved_searches HTTP/1.1" 200 1755 "http://192.168.100.110:9653/dashboard" "Mozilla/5.0 (Windows NT 5.2; rv:14.0) Gecko/20100101 Firefox/14.0.1" 192.168.100.110:9653 192.168.100.102 - - [08/Jan/2014:13:27:09 -0800] "GET /undefined/app/js/lib/bootstrap-datetimepicker.js HTTP/1.1" 200 1755 "http://192.168.100.110:9653/dashboard" "Mozilla/5.0 (Windows NT 5.2; rv:14.0) Gecko/20100101 Firefox/14.0.1" 

请注意两个URLpath中的“/ undefined /”前缀。 这使我相信,请求可能正在由GUI使用未初始化的variables构造。 但是,日志条目中的返回码是200,表示Apache确实提供了某些东西。

我的虚拟主机定义如下(使用安装说明中的示例):

 Listen 9653 <VirtualHost *:9653> DocumentRoot /var/www/StatusWolf/ <Directory /> Options FollowSymLinks AllowOverride All </Directory> </VirtualHost> 

这是.htaccess重写规则的问题吗?

我应该在哪里寻找configuration问题?

感谢您的帮助!

编辑

我修改了index.php来logging在SWRouter对象实例化之前的URI:

 error_log("Instantiating SWRouter with URI " . $_SERVER['REQUEST_URI'] . "\n", 3, "/var/log/statuswolf/log_2014-01-08.txt"); $router = new SWRouter($_SERVER['REQUEST_URI']); 

这表明URI确实包含“/ undefined /”前缀,大概是由重写规则生成的:

 Instantiating SWRouter with URI /undefined/api/get_saved_searches Instantiating SWRouter with URI /undefined/app/js/lib/bootstrap-datetimepicker.js 

所以必须有一些Web服务器configuration和重写规则。 我会继续调查。

我也把这个问题发布到了StatusWolf的GitHub站点,开发者刚刚回到我身边。 问题的原因是我正在使用一个非常老的浏览器:

StatusWolf在窗口小部件javascript中使用“window.location.origin”来构build用于加载文件和进行API调用的URL。 您使用的是旧版本的Firefox(14.0.1,当前是26),我刚刚确认您使用的版本不支持window.location.origin,因此在StatusWolf内部存储URL的variables有“未定义”。 无论如何,你可以尝试与Chrome,或更新到一个新的Firefox?