首页 > 代码库 > Debian配置Apache2支持mod-python

Debian配置Apache2支持mod-python

Ubuntu好像是直接支持的,现在回到Debian有点不适应了。需要人工配置一下:

安装模块:apt-get install libapache2-mod-python

编辑文件:/etc/apache2/sites-available/000-default

增加如下内容:

        <Directory /var/www/>                Options Indexes FollowSymLinks MultiViews                AllowOverride None                Order allow,deny                allow from all                AddHandler mod_python .py                PythonHandler mod_python.publisher                PythonDebug On        </Directory>

 重启服务:/etc/init.d/apache2 restart

参考:https://www.howtoforge.com/embedding-python-in-apache2-with-mod_python-debian-etch

 

Debian配置Apache2支持mod-python