我试图让一个简单的狐猴CGI启动并运行,但是当我在浏览器中导航到lemur.cgi时,我会得到一个500个服务器配置错误。
内部服务器错误 服务器遇到内部错误或配置错误,无法完成您的请求。 请与服务器管理员root@localhost联系,并通知他们错误发生的时间,以及可能导致错误的任何操作。 有关此错误的详细信息,请参阅服务器错误日志。
我通过在IndriBuildIndex中运行~/indri_test/param_files/来构建索引。这创建了一个与索引./krovetz_stop同名的子目录。
我可以使用IndriRunQuery手动查询索引,而不会出现问题。
我遵循一个教程来设置CGI,它让我执行以下步骤:
$ cd ~
$ mkdir ~/public_html
$ chmod 711 ~/
$ cd public_html
$ cp -r ~/indri-5.1/site-search/cgi/bin/* ~/public_html
$ chmod 775 lemur.cgi
$ chcon -t httpd_sys_script_exec_t lemur.cgi然后,我在~/public_html中更新了~/public_html文件,以指向我的索引(更正式地说,我将它指向在构建索引时创建的子目录,因为否则我不确定“索引的路径”是什么)。这是我的lemur.config文件:
<lemurconfig>
<templatepath>./templates/</templatepath>
<supportanchortext>true</supportanchortext>
<indexes>
<index>
<path>/home/user/indri_test/param_files/krovetz_stop/</path>
<description>Krovetz stemmer, no stop words</description>
</index>
</indexes>
</lemurconfig>据我所知,一切都应该正常,但事实并非如此。也许我需要用自动工具重建CGI?有什么想法吗?我可以采取哪些步骤来调试这个问题?也许我没有使用正确的索引路径?是否需要修改索引目录的权限?
谢谢
发布于 2014-01-28 20:24:14
毕竟这是一个权限问题。通过下列方式解决:
chmod 755 ~/public_htmlhttps://stackoverflow.com/questions/21414333
复制相似问题