禁止您无权访问/ cgi-bin / mailman /

我刚刚从Ubuntu服务器升级到14.0.4 LTS,我不能再通过Web界面访问Mailman。 我得到一个403禁止的错误(禁止:你没有权限访问/ cgi-bin / mailman /)。 我已经几次了解了Apacheconfiguration,并没有看到这个问题。

我正在运行Apache 2.4.7和Mailman 2.1.16。 这是我的/etc/mailman/apache2.conf中的configuration。 我不知道还有什么地方要看这个。 它可能是一个虚拟主机问题?

# Logos: Alias /images/mailman/ /usr/share/images/mailman/ # Use this if you don't want the "cgi-bin" component in your URL: # In case you want to access mailman through a shorter URL you should enable # this: #ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/ # In this case you need to set the DEFAULT_URL_PATTERN in # /etc/mailman/mm_cfg.py to http://%s/mailman/ for the cookie # authentication code to work. Note that you need to change the base # URL for all the already-created lists as well. <Directory /usr/lib/cgi-bin/mailman/> AllowOverride all Options +ExecCGI AddHandler cgi-script .cgi index.cgi Order allow,deny Allow from all </Directory> <Directory /var/lib/mailman/archives/public/> Options +FollowSymlinks AllowOverride all Order allow,deny Allow from all </Directory> <Directory /usr/share/images/mailman/> AllowOverride all Order allow,deny Allow from all </Directory> 

不,这肯定不是虚拟主机的问题。

(1)

如果你的apacheconfiguration不是允许这些目录的话,你会得到403错误,但是如果apache没有权限访问这个目录

要知道这一点,你可以很容易地testing:简单地su到apache用户( su www-data -c /bin/bash ),然后尝试进入指定目录,列出它,从中读取文件等,就像Apache服务器提供的请求一样。

(2)

无论如何,通常Apache的error.log包含大部分相对清晰和可理解的推理,为什么这样的请求是不可用的。

(3)

接下来,有什么可以去的:你可以停止Apache,然后用strace重新启动。 所以:

 strace -s 200 -f -o trace.txt apachectl start 

它会很慢,但是你会得到一个非常详细的日志trace.txt ,在那里你将能够发现,究竟是什么问题。 不幸的是,这个技巧对你来说可能是非常神秘的。

(4) 可能的解决scheme:

apache 2.2和2.4之间的configuration文件语法有点改变。 你的Ubuntu升级可能升级了Apache,但没有改变configuration。 阅读这个获得更详细的答案: https : //httpd.apache.org/docs/2.4/upgrading.html#access 。