What's new? | Help | Directory | Sign in
Google
modwsgi
Python WSGI adapter module for Apache.
  
  
  
  
    
Search
for
Updated Jun 30, 2008 by Graham.Dumpleton
Labels: Phase-Deploy
InstallationOnWindows  
Installation of mod_wsgi on Windows.

Installation On Windows

The mod_wsgi source code package doesn't yet contain scripts for building on Windows as yet, although a couple of different solutions have been developed independently by third parties. In time these scripts will likely be integrated into the source package, but in the interim Adal Chiriliuc is kindly making available precompiled binaries for the more recent versions of Apache and Python.

Precompiled Binaries

The precompiled Windows binaries for mod_wsgi can be found at:

http://adal.chiriliuc.com/mod_wsgi/

Four variations of the modules are generally available, so make sure you select the correct one for the version of Python and Apache that is being used:

Thanks to Adal Chiriliuc for making these available.

Module Installation

The appropriate mod_wsgi.so file for the version of Python and Apache being used should be copied into the Apache modules directory. Typically this directory would be:

\Program Files\Apache Group\Apache2\modules\

Ensure first that this is actually the location where Apache has been installed in case it is different for your platform. Also ensure that the file when installed has access permissions such that the user that the Apache service runs as will be able to read it.

To configure Apache to make use of mod_wsgi, follow the instructions in the README file contained in the mod_wsgi source code. Also refer to the general configuration guidelines.

Python Requirements

When Python was being installed, it is preferable that it was installed as an Administrator. By installing it as an Administrator, it will ensure that the msvcr71.dll file is installed into the Windows system folder and will be able to be found by Apache when it is being run as a service.

Running installation of Python as the Administrator also ensures that Windows registry entries related to Python are configured for the entire machine and not just the user that installed Python.

If you have multiple versions of Python installed on your system, you must ensure that the first one found when the application PATH is searched is the version you wish to use. If this isn't the case, Python may not find the correct directories from which to load the site initialisation file and any Python modules.

Note that although the precompiled mod_wsgi modules may not have been compiled with the exact same patch level version of Python as you are running, and as a result you may see a warning in the Apache error log files about a version mismatch, this warning can be ignored. You should only be concerned where the major/minor versions of Python differ, in which case you install the correct version of the precompiled mod_wsgi module binary.