无法获得RT的新实例启动

我试图从CentOS 4服务器移植一个RT 4.0.1实例(本地代码定制)到CentOS 6服务器。

我的问题似乎是我无法启动fastcgi脚本。

当apache启动时,会出现这个错误:

[Mon Mar 25 12:37:37 2013] [warn] FastCGI: server "/opt/rt4/sbin/rt-server.fcgi" (uid 48, gid 48) restarted (pid 1504) suexec policy violation: see suexec log for more details [Mon Mar 25 12:37:37 2013] [warn] FastCGI: server "/opt/rt4/sbin/rt-server.fcgi" (pid 1504) terminated by calling exit with status '107' [Mon Mar 25 12:37:38 2013] [warn] FastCGI: server "/opt/rt4/sbin/rt-server.fcgi" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds 

suexec.log的内容:

 [2013-03-25 12:37:37]: uid: (apache/apache) gid: (apache/apache) cmd: rt-server.fcgi [2013-03-25 12:37:37]: cannot run as forbidden uid (48/rt-server.fcgi) 

suexec.log意味着我需要

  • 告诉suexec它可以像apache一样运行fastcgi脚本(这是C4系统上正在发生的事情); 要么
  • 弄清楚如何告诉suexec以不同的用户身份运行fastcgi脚本

我的google-fu今天很弱,我找不到任何一个问题的答案。

网站定义的内容:

 FastCgiServer /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 180 <VirtualHost *:80> ServerName arrtee.$MYDOMAIN AddDefaultCharset UTF-8 # Pass through requests to display images Alias /NoAuth/images/ /opt/rt4/share/html/NoAuth/images/ ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/ DocumentRoot "/opt/rt4/share/html" <Location /> Order allow,deny Allow from all Options +ExecCGI AddHandler fastcgi-script fcgi </Location> </VirtualHost> 

我可以以root用户身份运行fastgcgi脚本,它可以工作。 (在此之后,我将整个/ opt / rt4树上的所有权和组成员更改回apache:apache。)

我甚至删除了整个/ opt / rt4树,并尝试从源代码重新安装,但仍然无法正常工作。

有人能告诉我我在这里错过了什么吗?

你没有提到你如何安装fastcgi,但是在web部署文档中有一些说明,一些发行版也需要:

 FastCgiIpcDir /tmp 

许多用户也对mod_fcgid感到幸运,mod_fcgid通过EPEL作为一个包提供。

SELinux设置有时也会导致权限问题,如果您想保留SELinux设置,则需要进行特殊设置。

在公共论坛上问一个问题是没有办法解决的。

就我而言,在CentOS 6服务器上,在/etc/httpd/conf.d/fastcgi.conf有一个指令:

 # wrap all fastcgi script calls in suexec FastCgiWrapper On 

注释掉第二行,它可以工作,大概是通过禁用suexec安全。 从长远来看,这可能是错误的解决scheme。