狐猴CGI的配置问题

时间:2014-01-28 18:53:48

标签: search configuration search-engine lemur indri

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

  

内部服务器错误

     

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

     

请与服务器管理员root @ localhost联系,告知他们错误发生的时间,以及可能导致错误的任何操作。

     

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

我通过在~/indri_test/param_files/中运行IndriBuildIndex来构建索引。这创建了一个与索引./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>

据我所知,一切都应该有效,但事实并非如此。也许我需要用autotools重建CGI?任何想法我可以采取什么步骤来调试问题?也许我没有使用索引的正确路径?我是否需要修改索引目录的权限?

由于

1 个答案:

答案 0 :(得分:0)

毕竟这是一个权限问题。解决方法:

chmod 755 ~/public_html