Tags
apache backup C cache cassandra checkbox config crontab database editplus firefox function html ie6 java javascript jquery jsScrolling lampp linux memcache mysql nginx NoSql packer pear php plugin popup ppt python scrollbar server shell svn Tips tool ttserver ubuntu vim VirtualHost vps win xdebug ZendStudioCategories
-
Recent Posts
- 删除 MySQL 二进制日志(log-bin)
- 抽象类与接口类
- MySQL 4.1+ using old authentication
- 在VPS上搭建VPN
- Windows 下安装 Memcached
- 理解 Memcache 的服务器端与客户端
- 理解PHP中Mysql的永久连接
- Web-Server 中 PHP 的两种工作方式
- Zend Studio 使用 Xdebug 断点调试
- Zend Studio 中 PHP Language Library 的用处
- Windows 下安装 mongoDB
- C 操作 MySql
- Linux下SVN客户端版本库定时更新
- 开启SVN-Server上的密码认证功能
- 通过rsync定期备份windows下svn目录到linux
Archives
- September 2011 (1)
- August 2011 (3)
- July 2011 (4)
- June 2011 (9)
- May 2011 (1)
- April 2011 (3)
- March 2011 (2)
- January 2011 (3)
- October 2010 (2)
- September 2010 (9)
- August 2010 (22)
-
RSS Links
Blogroll
-
Meta
让 Apache 支持 mod_python
mod_pytho 中文文档
http://man.chinaunix.net/develop/python/mod_python/mod_python.html
1, 下载 ModPython-3.3.1 (http://www.apache.org/dist/httpd/modpython/win/3.3.1/), 安装, 安装过程中会讯问 apache 安装目录.
2, 在apache的httpd.conf中加入下面一行:
3, 再加入下面一段
Alias /py/ "d:/PythonCode/" <Directory "d:/PythonCode/"> AddHandler mod_python .py #PythonHandler mptest PythonHandler mod_python.publisher PythonDebug On </Directory>4, 在 d:/PythonCode/ 目录下新建一名为 mptest.py 的测试文件,内容如下
from mod_python import apache def handler(req): req.content_type = "text/plain" req.write("Hello World!") return apache.OK5, 通过 http://127.0.0.1/py/mptest.py 访问测试
可能会遇到的问题: