Note that there are some explanatory texts on larger screens.

plurals
  1. POConfigure mod_wsgi 3.3 with Apache2.2 on Windows
    primarykey
    data
    text
    <p>I was able to compile mod_wsgi for Python 2.5.4. It is now loaded into apache modules. I confirmed it by command </p> <pre><code>httpd.exe -M . . wsgi_module(shared) php5_module(shared) </code></pre> <p>But I am unable to run a test file(hello.wsgi), it is located in folder c:/apache/htdocs/wsgi : so the path of file becomes c:/apache/htdocs/wsgi/hello.wsgi</p> <p>My hello.wsgi file contains:</p> <pre><code>def application(environ, start_response): status = '200 OK' output = 'Hello World!' response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output] </code></pre> <p>I added the following lines to httpd.conf:</p> <pre><code>LoadModule wsgi_module modules/mod_wsgi.so &lt;IfModule wsgi_module&gt; WSGIScriptAlias /wsgi/ "c:/apache/htdocs/wsgi/hello.wsgi" &lt;Directory "c:/apache/htdocs/wsgi"&gt; Order deny,allow allow from All &lt;/Directory&gt; &lt;/IfModule&gt; </code></pre> <p>And my Apache Error Log is :</p> <pre><code>[Sat Nov 19 15:29:32 2011] [warn] pid file C:/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Sat Nov 19 15:29:32 2011] [warn] mod_wsgi: Compiled for Python/2.5. [Sat Nov 19 15:29:32 2011] [warn] mod_wsgi: Runtime using Python/2.5.4. [Sat Nov 19 15:29:33 2011] [notice] Apache/2.2.21 (Win32) mod_wsgi/3.3 Python/2.5.4 PHP/5.3.8 configured -- resuming normal operations [Sat Nov 19 15:29:33 2011] [notice] Server built: Sep 9 2011 10:26:10 [Sat Nov 19 15:29:33 2011] [notice] Parent: Created child process 2296 [Sat Nov 19 15:29:33 2011] [warn] mod_wsgi: Compiled for Python/2.5. [Sat Nov 19 15:29:33 2011] [warn] mod_wsgi: Runtime using Python/2.5.4. [Sat Nov 19 15:29:33 2011] [notice] Child 2296: Child process is running [Sat Nov 19 15:29:33 2011] [notice] Child 2296: Acquired the start mutex. [Sat Nov 19 15:29:33 2011] [notice] Child 2296: Starting 64 worker threads. [Sat Nov 19 15:29:33 2011] [notice] Child 2296: Starting thread to listen on port 80. [Sat Nov 19 15:30:21 2011] [error] [client 127.0.0.1] File does not exist: C:/apache/htdocs/wsgi </code></pre> <p><strong>Update</strong></p> <p>I removed the trailing slash from alias, i have moved my wsgi folder from htdocs to apache &amp; created a vhost file:</p> <pre><code>&lt;VirtualHost 127.0.0.1:80&gt; &lt;Directory "C:/apache/wsgi"&gt; Options FollowSymLinks Indexes AllowOverride All Order deny,allow allow from All &lt;/Directory&gt; ServerName 127.0.0.1 ServerAlias 127.0.0.1 WSGIScriptAlias /wsgi "C:/apache/wsgi/hello.wsgi" DocumentRoot "C:/apache/wsgi" ErrorLog "C:/apache/logs/127.0.0.1.err" CustomLog "C:/apache/logs/127.0.0.1.log" combined &lt;/VirtualHost&gt; </code></pre> <p>But now my Apache is giving some windows error like:</p> <pre><code>Faulting application name: httpd.exe, version: 2.2.21.0, time stamp: 0x4e6a3015 Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7ba58 Exception code: 0xc0000005 Fault offset: 0x00038da9 Faulting process id: 0xc4c Faulting application start time: 0x01cca6c0f9ccd446 Faulting application path: C:\apache\bin\httpd.exe Faulting module path: C:\Windows\SysWOW64\ntdll.dll Report Id: 3ba0b9e0-12b4-11e1-b285-005056c00008 </code></pre> <p>Need Some Help.</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload