Apache-2.2

將 cgi 腳本從 Apache 2.2 移動到 2.4 會導致 403 錯誤

  • February 25, 2016

我的配置如下:

#Include for LinuxStat (http://lstat.sf.net)
Alias /lstat/ "/usr/local/lstat/www/"
<Directory "/usr/local/lstat/www/">
#for execute CGI files
Options ExecCGI
AddHandler cgi-script .cgi
AllowOverride AuthConfig Limit
</Directory>

它總是在 Apache 2.4 上顯示錯誤 403,而在 Apache 2.2 上它工作正常。

應該糾正什麼?

我自己搞定了;)

#Include for LinuxStat (http://lstat.sf.net)
AddHandler cgi-script .cgi
Alias "/lstat/" "/usr/local/lstat/www/"
<Directory "/usr/local/lstat/www/">
AllowOverride None
Options +ExecCGI
Require all granted
Allow from all

引用自:https://serverfault.com/questions/759796