Win2k3下 Xampp 1.6.7 + mod_python + Python2.5

安装过程
1.安装xampp1.6.7 下载地址 www.apachefriends.org/zh_cn/xampp-windows.html
2.安装python 2.5 下载地址 www.python.org/ftp/python/2.5.2/python-2.5.2.msi
3.安装mod_python 下载地址 apache.mirror.phpchina.com/httpd/modpython/win/3.3.1/

配置如下
httpd.conf:
加入
LoadModule python_module modules/mod_python.so
# Python conf
Include conf/extra/httpd-python.conf

httpd-python.conf:

<IfModule python_module>
#Python DocumentRoot
Alias /py "E:/your path/"
<Directory "E:/your path">
    AddHandler mod_python .py
    PythonHandler mod_python.publisher  #也可以指定某个脚本比如 test 然后可以使用 http://url/test 调用 test.py 中的 handler()
#如果使用mod_python.publisher 则可以用 http://url/test.py/handler 调用
    PythonDebug On #调试模式
#前3行必需
    Options Indexes MultiViews
    AllowOverride All #至少是FileInfo
    Order allow,deny
    Allow from all
</Directory>
</IfModule>

你可能感兴趣的:(apache,html,windows,python,脚本)