python+apache初探
来源:互联网 发布:linux如何查看log文件 编辑:程序博客网 时间:2024/06/05 15:29
python的web开发:
apache 2.0.59
mod_apache 3.3.1
一:install apache:
./configure --prefix=/home/apache --enable-suexec --with-suexec-bin=/usr/sbin/suexec --enable-so --enable-rewrite --enable-mime --enable-mime-magic --with-mpm=worker --enable-modules=most --enable-mods-shared=all --enable-rule=SHARED_COR
make;make install
二:install mod_apache
./configure --with-apxs=/homeapache/bin/apxs --with-python=/usr/local/bin/python2.5 --with-max-locks=32
make;make install
三:config apache-httpd.conf
insert it
LoadModule python_module modules/mod_python.so
<Directory /home/apache/htdocs/test>
AllowOverride FileInfo
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On
</Directory>
注意一定要加上AllowOverride FileInfo否则脚本无法正常显示,通常回提示no found module:mptest
四:check
from mod_python import apache
def handler(req):
req.write("its ok!!")
return apache.OK
apache 2.0.59
mod_apache 3.3.1
一:install apache:
./configure --prefix=/home/apache --enable-suexec --with-suexec-bin=/usr/sbin/suexec --enable-so --enable-rewrite --enable-mime --enable-mime-magic --with-mpm=worker --enable-modules=most --enable-mods-shared=all --enable-rule=SHARED_COR
make;make install
二:install mod_apache
./configure --with-apxs=/homeapache/bin/apxs --with-python=/usr/local/bin/python2.5 --with-max-locks=32
make;make install
三:config apache-httpd.conf
insert it
LoadModule python_module modules/mod_python.so
<Directory /home/apache/htdocs/test>
AllowOverride FileInfo
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On
</Directory>
注意一定要加上AllowOverride FileInfo否则脚本无法正常显示,通常回提示no found module:mptest
四:check
from mod_python import apache
def handler(req):
req.write("its ok!!")
return apache.OK
- python+apache初探
- Python初探
- Python初探
- python 初探
- Python 初探
- Python初探
- Python初探
- 初探python
- 初探python
- 初探Python
- 初探python
- python初探
- python初探
- 初探python
- Python初探
- Apache ServiceMix 初探
- Apache ServiceMix 初探
- Apache apollo初探
- C#中静态构造函数的学习
- 代码内嵌
- Lucene倒排索引原理[转]
- 欢迎大家的到来
- 一道动归问题
- python+apache初探
- Test!
- speex-1.2beta2开源音频编码器win32下编译的一点心得
- Lucene中的基本概念
- 具有自定义分页和排序功能的DataGrid控件
- Open XML 简单介绍
- 从WS-DM,WS-Man到WS-Resource Catalog
- 又过生日了
- Struts2学习(六):访问隐藏的request和session