0

我正在尝试启动并运行一个简单的狐猴 CGI,但是当我在浏览器中导航到 lemur.cgi 时,我收到 500 服务器配置错误。

内部服务器错误

服务器遇到内部错误或配置错误,无法完成您的请求。

请联系服务器管理员 root@localhost 并告知他们错误发生的时间,以及您所做的任何可能导致错误的事情。

服务器错误日志中可能提供有关此错误的更多信息。

我通过在~/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

然后我更新了lemur.config文件~/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?任何想法我可以采取哪些步骤来调试问题?也许我没有使用正确的索引路径?我需要修改索引目录的权限吗?

谢谢

4

1 回答 1

0

毕竟这是一个权限问题。通过以下方式解决:

chmod 755 ~/public_html
于 2014-01-28T20:24:14.423 回答