标签类目:mod_python

[mod_python] apache log handler

分类:Python

# A log handler for mod-python

  1. from mod_python import apache
  2. import logging
  3.  
  4. class ProxyLogThing:
  5.     """A proxy for default Apache logging."""
  6.  
  7.     def __init__(self):
  8.         # No need to do anything.
  9.  
  10.     def log_error(msg, lvl):
  11.         apache.log_error(msg, lvl)

继续阅读 »

Django配置

分类:Python

配置mod_python

1.使用apache_2.0.54-win32-x86-no_ssl.msi
http://archive.apache.org/dist/httpd/binaries/win32/

2.安装mod_python-3.2.8.win32-py2.4.exe
http://apache.justdn.org/httpd/modpython/

mod_python中文文档
http://man.chinaunix.net/develop/python/mod_python/mod_python.h

继续阅读 »

mod_python及psp开发配置

分类:Python在apache的配置文件httpd.conf追加

<Directory /some/path>
   AddHandler mod_python .psp
   PythonHandler mod_python.psp
   PythonDebug On
</Directory>
<IfModule mod_dir.c>
    DirectoryIndex index.psp index.html index.htm
</IfModule>

mod_python下载地址:http://httpd.apache.org/modules/python-download.cgi 选择自己需要的版本。

继续阅读 »


返回顶部