mailman
我正在尝试在本地机器上安装。我使用的是 Debian 8。我使用 安装了 mailman apt-get install mailman
。然后我将mailman.conf
文件复制到/etc/apache2/sites-available/mailman.conf
。
现在,当我尝试在浏览器中打开此链接时,localhost/mailman/listinfo
它不会打开页面,而是下载不应该发生的脚本。
这是 mailman.conf 文件。
ScriptAlias /cgi-bin/mailman/ /usr/lib/cgi-bin/mailman/
# And the public archives:
Alias /pipermail/ /var/lib/mailman/archives/public/
# 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 None
Options ExecCGI
AddHandler cgi-script .cgi
# Order allow,deny
# Allow from all
Require all granted
</Directory>
<Directory /var/lib/mailman/archives/public/>
Options FollowSymlinks
AllowOverride None
# Order allow,deny
# Allow from all
Require all granted
</Directory>
<Directory /usr/share/images/mailman/>
AllowOverride None
# Order allow,deny
# Allow from all
Require all granted
</Directory>
这就是我现在要做的tail -f *.log
。/var/log/apache2
在我的浏览器中,我把这个localhost/cgi-bin/mailman/confirm
::1 - - [01/Jun/2015:14:43:36 +0530] "GET /cgi-bin/mailman/confirm HTTP/1.1" 200 10463 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.6.0"
我很困惑不知道该怎么办。
答案1
在我自己在 Debian 8 上全新安装的 Apache2 中,我惊讶地发现 CGI Apache 模块默认未启用。您的情况也可能如此。
尝试:
sudo a2enmod cgi
sudo service apache2 restart
...看看这是否会让事情变得更好。(对我来说确实如此。)
答案2
在 Debian 中,配置sites-available
不会自动应用。我认为你需要做类似的事情
sudo a2ensite mailmain
sudo systemctl restart apache2
看看是否能够正确解释 CGI。