I'm trying to install mod_wsgi module followed this instruction. I've downloaded mod_wsgi.so from this source. It seems like apache cannot restart services properly and the page cannot be loaded after I added the following line to httpd.conf
LoadModule wsgi_module modules/mod_wsgi.so
I've checked some issues from some sources as follows:
Environment:
Without loading this module, apache runs properly. What is my problem?
Application error.log:
[Mon May 23 10:12:20 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon May 23 10:12:20 2011] [notice] Child 4528: Exit event signaled. Child process is ending.
[Mon May 23 10:12:21 2011] [notice] Child 4528: Released the start mutex
[Mon May 23 10:12:22 2011] [notice] Child 4528: All worker threads have exited.
[Mon May 23 10:12:27 2011] [notice] Child 4528: Child process is exiting
[Mon May 23 10:12:28 2011] [notice] Parent: Child process exited successfully.
[Mon May 23 10:13:46 2011] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Mon May 23 10:13:46 2011] [notice] Server built: Jan 18 2008 00:37:19
[Mon May 23 10:13:46 2011] [notice] Parent: Created child process 5316
[Mon May 23 10:13:46 2011] [notice] Child 5316: Child process is running
[Mon May 23 10:13:46 2011] [notice] Child 5316: Acquired the start mutex.
[Mon May 23 10:13:46 2011] [notice] Child 5316: Starting 64 worker threads.
[Mon May 23 10:13:46 2011] [notice] Child 5316: Starting thread to listen on port 81.
[Mon May 23 10:14:57 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon May 23 10:14:57 2011] [notice] Child 5316: Exit event signaled. Child process is ending.
[Mon May 23 10:14:58 2011] [notice] Child 5316: Released the start mutex
[Mon May 23 10:14:59 2011] [notice] Child 5316: All worker threads have exited.
[Mon May 23 10:15:04 2011] [notice] Child 5316: Child process is exiting
[Mon May 23 10:15:04 2011] [notice] Parent: Child process exited successfully.
From apache error.log, is it clear that installed apache is 32-bit?
Soulution: Change everything to 64-bit.
I was faced with this situation as well, and Apache would run on windows 64bit, but won't if mod_wsgi is loaded.
I found a solution which is pretty simple:
c:\wamp\bin\apache\Apache2.2.21\modules\
andhttpd.conf
and add a line like: LoadModule wsgi_module modules/mod_wsgi.so
Summary: Everything (both apache and mod_wsgi) has to be 64bit for you to be able to run Apache/mod_wsgi on a 64-bit windows.
From what I understand...
Currently no official 64bit versions of Apache and PHP exists for Microsoft Windows.
However, there is a dude out there who, at the time of writing this, has at least compiled Apache 2.2.19 x64 for us, which you can download here.
If you want a newer version, you'd have to compile it yourself, but that would be quite the undertaking!
Furthermore, even if you do get Apache x64 running nicely on Windows, what do you intend to do about mod_wsgi? This is the very reason I decided to just create an Arch Linux LAMP stack for this very purpose. I have it working fine now, but since Aptana doesn't sync with Django projects I'm looking into the Windows solutions again.
Please, let me know if you find a good solution!
EDIT: I found these 64-bit mod_wsgi's for py2.6 and 2.7, but I have yet to get them working.
EDIT: Yes! I got it working! My Apache Service Monitor has a green light and now says Apache/2.2.19 (Win64) mod_wsgi/3.3 Python/2.6.4. I'm using 2.6.4 because that's what Autodesk Maya is running and I want to keep the same version for consistency.
I got Apache/Mod_wsgi running on a Windows 2008 server.
The link to the 64 bit version of Apache provided by Peter is broken. I found one that worked for me at:
http://www.apachelounge.com/download/win64/
Read the readme.txt. The install is very simple.
His link to the 64 bit mod_wsgi is still good:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi
I used an win-amd64 version just fine and I think the hardware I'm on is Intel.
I made sure the Apache and Mod_wsgi versions matched as did the python version. I believe the mod_wsgi version I used was 3.3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With