fcgid 配置破坏了 Apache

fcgid 配置破坏了 Apache

我试图在我的网站上包含以下代码块以运行快速 CGI 脚本:

# Create a directory for the iipsrv binary
ScriptAlias /fcgi-bin/ "/home/USERNAME/SITENAME/fcgi-bin/"

# Set the options on that directory
<Directory "/home/USERNAME/SITENAME/fcgi-bin/">
   AllowOverride None
   Options None
 # Syntax for access is different in Apache 2.4 - uncomment appropriate version
   Apache 2.2
    Order allow,deny
    Allow from all

   Apache 2.4
    Require all granted

 # Set the module handler
   AddHandler fcgid-script .fcgi
</Directory>

# Set our environment variables for the IIP server
FcgidInitialEnv VERBOSITY "5"
FcgidInitialEnv LOGFILE "/home/USERNAME/SITENAME/fcgi-bin/iipsrv.log"
FcgidInitialEnv MAX_IMAGE_CACHE_SIZE "10"
FcgidInitialEnv JPEG_QUALITY "50"
FcgidInitialEnv MAX_CVT "3000"

# Define the idle timeout as unlimited and the number of # processes we want
FcgidIdleTimeout 0
FcgidMaxClassProcessesPerClass 1

当我添加此代码并重新启动服务器时,我的所有网站都停止工作。显然我没有正确配置它,而且我对 fast-cgi 了解不够,不知道我做错了什么。如果有人能指出问题所在并提出一些修复建议,我将不胜感激。我的托管服务提供商(Dreamhost,在 VPS 上)的支持人员不支持自定义配置,所以我只能自己解决这个问题。

答案1

首先:

Apache 2.2
  Order allow,deny
  Allow from all

Apache 2.4
  Require all granted

选择其中一个,并且该行Apache 2.2和该Apache 2.4行都不应取消注释。

相关内容