我正在尝试在本地机器上安装mailman 。 我使用的是debian 8.我只使用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>
这就是我现在正在做的/var/log/apache2 tail -f *.log 。 在我的浏览器中,我把这个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"
我很困惑,该怎么做。
在Debian 8上我自己新鲜的Apache2安装,我发现我的惊讶CGI Apache模块默认情况下没有启用。 这也可能是你的情况。
尝试:
sudo a2enmod cgi sudo service apache2 restart
…看看是否让事情变得更好。 (它为我做了。)
在Debian中, sites-available的configuration不会自动应用。 我相信你需要做类似的事情
sudo a2ensite mailmain sudo systemctl restart apache2
看看是否允许CGI被正确解释。