They I presently use has outgrown the django development server for running django programs inside our local development conditions. The atmosphere itself (server 2008 vm) is a mixture of .internet programs backed from IIS7 combined with several django programs.

We need to have having our local development conditions run all programs at the same time for easy development and testing. We've made the decision to maneuver towards a complete demonstration of apache running alongside IIS to more carefully resemble our production and testing conditions (the main difference obviously being linux / home windows for that host of apache).

We've set up mod_wsgi and apache to operate in your area nevertheless it appears that people do less than have either the python or even the django path set up properly as at runtime our programs are worrying that sights don't exist with error's like:

Couldn't import confirming.sights. Error was: DLL load unsuccessful: The specified module couldn't be located.

The django exception location is showing:

Exception Location: C:\Python27\lib\site-packages\django\core\urlresolvers.py in _get_callback, line 132

And then we assume it's some kind of path problem but by yet we haven't had the opportunity to determine what's going wrong.

Thanks all.

LoadModule wsgi_module modules/mod_wsgi.so
WSGIPythonHome X:\PathToApplication\venv\Scripts

<VirtualHost *:8000>
    ServerName applicationdomain
    ServerAlias applicationapidomain

    SetEnv DJANGO_ENV local

    WSGIScriptAlias / X:/PathToApplication/apache/django.wsgi
    <Directory X:/PathToApplication/ >
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:8001>
    ServerName applicationdomain

    SetEnv DJANGO_ENV local

    SSLEngine on
    SSLProtocol all -SSLv2
    SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
    SSLCertificateFile "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\wildcard.crt"
    SSLCertificateKeyFile "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\wildcard.key"

    WSGIScriptAlias / X:/PathToApplication/apache/django.wsgi
    <Directory X:/PathToApplication/ >
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

Your condition has related to put together modules and mod_wsgi.

Python from Python.org comes with an embedded manifest that enables it to load DLL files. When producing C modules python accustomed to embed the manifest within the put together modules, however since has began draining them out automatically. The problem here's that mod_wsgi includes it's own python interpreter which doesn't have that manifest file incorporated.

I believe to be able to get this work you have to either compile with MingW, embed a manifest into Apache, or change python to embed a manifest in to the modules you're producing.

http://www.mail-archive.com/modwsgi@googlegroups.com/msg06255.html includes a response from somebody that was embedding the manifest into apache2.

If my memory serves around line 680ish of Python27/Lib/distutils/msvc9compiler.py there must be a little of code that appears like

try:
    # Remove references to the Visual C runtime, so they will
    # fall through to the Visual C dependency of Python.exe.
    # This way, when installed for a restricted user (e.g.
    # runtimes are not in WinSxS folder, but in Python's own
    # folder), the runtimes do not need to be in every folder
    # with .pyd's.
    manifest_f = open(manifest_file)
    try:
        manifest_buf = manifest_f.read()
    finally:
        manifest_f.close()
    pattern = re.compile(
        r"""<assemblyIdentity.*?name=("|')Microsoft\.""" \
        r"""VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)""",
        re.DOTALL)
    manifest_buf = re.sub(pattern, "", manifest_buf)
    pattern = "<dependentAssembly>\s*</dependentAssembly>"
    manifest_buf = re.sub(pattern, "", manifest_buf)
    manifest_f = open(manifest_file, 'w')
    try:
        manifest_f.write(manifest_buf)
    finally:
        manifest_f.close()
except IOError:
    pass

getting rid of or leaving comments this out should stop python from draining the manifest file.