Discussion:
[modwsgi] mod_wsgi on Windows 8.1 64-bit development machine
Richard Lee
2015-03-13 05:08:05 UTC
Permalink
hello,

I'm trying to organise *mod_wsgi *on my desktop at home (Windows 8.1
64-bit), hoping to pair it with Apache2.4 / Django / Python 3.4

I have read the following very carefully
<https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst>,
and was working through the "hello world" case
<https://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide> to
localise to my machine, but am still running into difficulties

The VC compiler alignment requirements are tough and quite cryptic, so I am
posting here to ask if I have any missing steps. I even tried to download
Microsoft Visual Studio at one point to compile it myself, but wasn't sure
which version and to no avail- it did not have *nmake.exe *in the contents.

The steps I have taken thusfar:


1. Install Apache 2.4 binary from Apache Lounge, *httpd-2.4.12-win64.zip* and
getting the basic test page operational.
2. Set Apache logging level from "warn" to "debug"
3. Installed Python *python-3.4.2.amd64.msi *for my 64-bit windows
machine
4. Downloaded the pre-compiled binary, *mod_wsgi-4.4.10+ap24vc10-cp34-none-win_amd64.whl
*from uci.edu download site
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi> ,
- aligning it to Python 3.4.2 VC10, and Apache VC10
- renaming it to *mod_wsgi.so *and putting it into the
*Apache24/modules* directory
5. Added the following to /conf/

LoadModule wsgi_module modules/mod_wsgi.so
...
WSGIScriptAlias /myapp "c:/Apache24/wsgi-scripts/myapp.wsgi"
<Directory "c:/Apache24/wsgi-scripts">
Order allow,deny
Allow from all
</Directory>
C:\Apache24\bin>httpd -k restart
httpd: Syntax error on line 177 of C:/Apache24/conf/httpd.conf: Cannot
load modules/mod_wsgi.so into server: %1 is not a valid Win32 application.
I'm not sure the material in Step 4 is usuable as a *mod_wsgi.so *file?

Are there any other issues I might have missed? I'm a little bit lost here
and there seem to be many steps where something could go wrong.

Thanks and Kind Regards

Richard Lee
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Joonas Lehtolahti
2015-03-13 18:47:11 UTC
Permalink
Post by Richard Lee
4. Downloaded the pre-compiled binary,
*mod_wsgi-4.4.10+ap24vc10-cp34-none-win_amd64.whl
*from uci.edu download site
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi> ,
- aligning it to Python 3.4.2 VC10, and Apache VC10
- renaming it to *mod_wsgi.so *and putting it into the
*Apache24/modules* directory
Did you rename the .whl file to mod_wsgi.so? That's wrong way to do it.
That file is actually a ZIP archive containing mod_wsgi.so inside it:

$ file mod_wsgi-4.4.10+ap24vc10-cp34-none-win_amd64.whl
mod_wsgi-4.4.10+ap24vc10-cp34-none-win_amd64.whl: Zip archive data, at
least v2.0 to extract

Archive: mod_wsgi-4.4.10+ap24vc10-cp34-none-win_amd64.whl
inflating: mod_wsgi-4.4.10+ap24vc10.data/data/mod_wsgi.so
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/DESCRIPTION.rst
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/metadata.json
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/top_level.txt
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/WHEEL
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/METADATA
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/RECORD

So I would suggest renaming the file to .zip, and extracting mod_wsgi.so
from inside it.

I hope this helps,

Joonas
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Richard Lee
2015-03-16 16:23:11 UTC
Permalink
oh... didn't know that whl = zip file

thanks!

running into Apache permissions errors now but will have to do some reading
and take it from here
Post by Joonas Lehtolahti
Post by Richard Lee
4. Downloaded the pre-compiled binary,
*mod_wsgi-4.4.10+ap24vc10-cp34-none-win_amd64.whl
*from uci.edu download site
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi> ,
- aligning it to Python 3.4.2 VC10, and Apache VC10
- renaming it to *mod_wsgi.so *and putting it into the
*Apache24/modules* directory
Did you rename the .whl file to mod_wsgi.so? That's wrong way to do it.
$ file mod_wsgi-4.4.10+ap24vc10-cp34-none-win_amd64.whl
mod_wsgi-4.4.10+ap24vc10-cp34-none-win_amd64.whl: Zip archive data, at
least v2.0 to extract
Archive: mod_wsgi-4.4.10+ap24vc10-cp34-none-win_amd64.whl
inflating: mod_wsgi-4.4.10+ap24vc10.data/data/mod_wsgi.so
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/DESCRIPTION.rst
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/metadata.json
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/top_level.txt
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/WHEEL
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/METADATA
inflating: mod_wsgi-4.4.10+ap24vc10.dist-info/RECORD
So I would suggest renaming the file to .zip, and extracting mod_wsgi.so
from inside it.
I hope this helps,
Joonas
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2015-03-16 07:16:09 UTC
Permalink
Any reason you didn't just use the official mod_wsgi builds I make available rather than those from the gohike site?

They can be found at:

https://github.com/GrahamDumpleton/mod_wsgi/releases

Go down to version 4.4.6 and you will find the last Windows builds.

They aren't updated on every build as usually there isn't a need as most changes aren't relevant to Windows.

Graham
Post by Richard Lee
hello,
I'm trying to organise mod_wsgi on my desktop at home (Windows 8.1 64-bit), hoping to pair it with Apache2.4 / Django / Python 3.4
I have read the following very carefully, and was working through the "hello world" case to localise to my machine, but am still running into difficulties
The VC compiler alignment requirements are tough and quite cryptic, so I am posting here to ask if I have any missing steps. I even tried to download Microsoft Visual Studio at one point to compile it myself, but wasn't sure which version and to no avail- it did not have nmake.exe in the contents.
Install Apache 2.4 binary from Apache Lounge, httpd-2.4.12-win64.zip and getting the basic test page operational.
Set Apache logging level from "warn" to "debug"
Installed Python python-3.4.2.amd64.msi for my 64-bit windows machine
Downloaded the pre-compiled binary, mod_wsgi-4.4.10+ap24vc10-cp34-none-win_amd64.whl from uci.edu download site ,
aligning it to Python 3.4.2 VC10, and Apache VC10
renaming it to mod_wsgi.so and putting it into the Apache24/modules directory
Added the following to /conf/
LoadModule wsgi_module modules/mod_wsgi.so
...
WSGIScriptAlias /myapp "c:/Apache24/wsgi-scripts/myapp.wsgi"
<Directory "c:/Apache24/wsgi-scripts">
Order allow,deny
Allow from all
</Directory>
C:\Apache24\bin>httpd -k restart
httpd: Syntax error on line 177 of C:/Apache24/conf/httpd.conf: Cannot load modules/mod_wsgi.so into server: %1 is not a valid Win32 application.
I'm not sure the material in Step 4 is usuable as a mod_wsgi.so file?
Are there any other issues I might have missed? I'm a little bit lost here and there seem to be many steps where something could go wrong.
Thanks and Kind Regards
Richard Lee
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Richard Lee
2015-03-16 16:22:28 UTC
Permalink
Thanks... was suffering search fatigue... I guess I should have put "ctrl-f
windows" when I didn't immediately see the builds I wanted at the top of
the page

thanks again
Post by Graham Dumpleton
Any reason you didn't just use the official mod_wsgi builds I make
available rather than those from the gohike site?
https://github.com/GrahamDumpleton/mod_wsgi/releases
Go down to version 4.4.6 and you will find the last Windows builds.
They aren't updated on every build as usually there isn't a need as most
changes aren't relevant to Windows.
Graham
hello,
I'm trying to organise *mod_wsgi *on my desktop at home (Windows 8.1
64-bit), hoping to pair it with Apache2.4 / Django / Python 3.4
I have read the following very carefully
<https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst>,
and was working through the "hello world" case
<https://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide> to
localise to my machine, but am still running into difficulties
The VC compiler alignment requirements are tough and quite cryptic, so I
am posting here to ask if I have any missing steps. I even tried to
download Microsoft Visual Studio at one point to compile it myself, but
wasn't sure which version and to no avail- it did not have *nmake.exe *in
the contents.
1. Install Apache 2.4 binary from Apache Lounge,
*httpd-2.4.12-win64.zip* and getting the basic test page operational.
2. Set Apache logging level from "warn" to "debug"
3. Installed Python *python-3.4.2.amd64.msi *for my 64-bit windows
machine
4. Downloaded the pre-compiled binary, *mod_wsgi-4.4.10+ap24vc10-cp34-none-win_amd64.whl
*from uci.edu download site
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi> ,
- aligning it to Python 3.4.2 VC10, and Apache VC10
- renaming it to *mod_wsgi.so *and putting it into the
*Apache24/modules* directory
5. Added the following to /conf/
LoadModule wsgi_module modules/mod_wsgi.so
...
WSGIScriptAlias /myapp "c:/Apache24/wsgi-scripts/myapp.wsgi"
<Directory "c:/Apache24/wsgi-scripts">
Order allow,deny
Allow from all
</Directory>
C:\Apache24\bin>httpd -k restart
httpd: Syntax error on line 177 of C:/Apache24/conf/httpd.conf: Cannot
load modules/mod_wsgi.so into server: %1 is not a valid Win32
application.
I'm not sure the material in Step 4 is usuable as a *mod_wsgi.so *file?
Are there any other issues I might have missed? I'm a little bit lost
here and there seem to be many steps where something could go wrong.
Thanks and Kind Regards
Richard Lee
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an
.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Loading...