[size=large][align=center]Apache_python安装[/align][/size]
安装环境:ubuntu server
1. apache,mod_python,python,安装
a) Publisher Handler模式配置
编辑apache的虚拟主机,在你的<Directory /var/www>区域加入以下:
b) PSP Handler模式配置
编辑apache的虚拟主机,在你的<Directory /var/www>区域加入以下:
以上两种模式都需要重启apache生效
2. 更好的选择mod-wsgi,但是需要你的应用程序支持
Ps:如果你安装了mod_python,需要先删除mod_python及其所有配置信息。
对你的应用进行相应配置即可。
更多参考内容:
[url=http://www.modpython.org/]mod_python官方网站[/url]
[url=http://man.chinaunix.net/develop/python/mod_python/mod_python.html#head-7aec6080cc842ea884d5e9ecfe1dee947386665f]mod_python中文参考手册[/url]
[url=http://code.google.com/p/modwsgi/]mod_wsgi项目首页[/url]
[url=http://fendou.org/2009/03/27/mod_scgi_description/]mod_wsgi文档中文翻译[/url]
安装环境:ubuntu server
1. apache,mod_python,python,安装
sudo apt-get install apache2 libapache2-mod-python python-mysqldb
a) Publisher Handler模式配置
编辑apache的虚拟主机,在你的<Directory /var/www>区域加入以下:
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug off
b) PSP Handler模式配置
编辑apache的虚拟主机,在你的<Directory /var/www>区域加入以下:
AddHandler mod_python .psp
PythonHandler mod_python.psp
PythonDebug off
以上两种模式都需要重启apache生效
sudo /etc/init.d/apache2 restart
2. 更好的选择mod-wsgi,但是需要你的应用程序支持
Ps:如果你安装了mod_python,需要先删除mod_python及其所有配置信息。
sudo apt-get install libapache2-mod-wsgi
对你的应用进行相应配置即可。
更多参考内容:
[url=http://www.modpython.org/]mod_python官方网站[/url]
[url=http://man.chinaunix.net/develop/python/mod_python/mod_python.html#head-7aec6080cc842ea884d5e9ecfe1dee947386665f]mod_python中文参考手册[/url]
[url=http://code.google.com/p/modwsgi/]mod_wsgi项目首页[/url]
[url=http://fendou.org/2009/03/27/mod_scgi_description/]mod_wsgi文档中文翻译[/url]