Installing mod_fastcgi Apache on Windows

October 17th, 2008

This installation assumes installed Apache. Here you go:

  1. Download mod_fastcgi dll from http://www.fastcgi.com/dist/.
  2. Copy the dll into c:\program files\apache software foundation\apache2.2\modules\ (if you are using default installation directory) and rename it to mod_fastcgi.dll.
  3. Edit httpd.conf and add the following line:
    LoadModule fastcgi_module modules/mod_fastcgi.dll
  4. Restart Apache.

Installing mod_python apache on windows

October 17th, 2008

To install and test mod_python Apache on Windows (assuming that you’ve already had Apache and Python installed):

  1. Download mod_python Win32 Binaries from http://httpd.apache.org/modules/python-download.cgi
  2. Run the installer. When prompted for Apache installation directory, type C:\Program Files\Apache Software Foundation\Apache2.2 (Assuming default Apache installation).
  3. Edit httpd.conf.
  4. Add the following line:
    LoadModule python_module modules/mod_python.so
  5. Configure your Apache <Directory> directives to include AddHandler, PythonHandler, and PythonDebug (examples below).

To test your mod_python installation:

  1. Create a file named mptest.py in say C:\sites.
  2. The file will contain:
    from mod_python import apache
    def handler(req):
      req.content_type = ‘text/plain’
      req.write(”Hello World”)
      return apache.OK
  3. Edit httpd.conf.
  4. Under <Directory “C:/sites”> directive add:
    AddHandler mod_python .py
    PythonHandler mptest
    PythonDebug On
  5. Restart Apache and point your browser to the mptest.py url.