For a start, in your wsgi.py file you have setup file system paths as:

os.chdir("C:\sensei\development")
sys.path.insert(0, "C:\sensei\development\sensei_web")
sys.path.insert(0, "c:\sensei\development”)

You should not really use backslashes for Windows paths like that when setting 
string in Python, as a backslash actually means in Python strings that any 
special escape meaning for character should be used instead. In the examples I 
see, none of the characters escaped have a special meaning and so it should see 
the right result, but do not rely on it.

For example:

>>> s ='C:\home\table'
>>> s
'C:\\home\table'
>>> print s
C:\home able

See how ‘\t’ means tab.

Better to use Posix style paths with forward slashes.

Next, although separate issue is that Apache configuration has:

Alias /site_static/ "C:/sensei/development/sensei_web/media/static"
Alias /site_media/ "C:/sensei/development/sensei_web/media”

Both paths when using a sub URL for static assets, should have a trailing 
slash, or neither. Not one with and one without, as depending on how you do 
that Apache will drop a slash from the path and it will not match properly.

Now because mod_wsgi will only lazily load the actual Python application code 
by default, on the first request, if you cannot telnet to the Apache port 80, 
immediately after Apache startup, then that would indicate an issue besides 
your application code.

If you comment out the WSGIScriptAlias directive and restart Apache, can you 
telnet port 80 then. Note that Apache will not respond with anything. You do 
actually need to send it something. So enter in telnet:

GET / HTTP/1.0

followed by two returns.

Graham

> On 14 Aug 2015, at 6:55 am, Daniel Ryan <[email protected]> wrote:
> 
> All of my components are 64 bit.  Running the simple server from wsgiref 
> using the application declared in wsgi.py works, and using the test hello 
> world application in wsgi.py instead of the django application also works 
> (apache renders successfully).
> 
> When I put the two together, however, I can't even establish a connection on 
> telnet:
> 
> Microsoft Telnet> o randev02 80
> Connecting To randev02...
> 
> 
> Connection to host lost.
> 
> Apache version information: 
> c:\Apache24\bin>httpd.exe -V
> Server version: Apache/2.4.16 (Win64)
> Apache Lounge VC10 Server built:   Jul 12 2015 14:53:37
> Servers Module Magic Number: 20120211:47
> Server loaded:  APR 1.5.2, APR-UTIL 1.5.4
> Compiled using: APR 1.5.2, APR-UTIL 1.5.4
> Architecture:   64-bit
> Server MPM:     WinNT
>   threaded:     yes (fixed thread count)
>     forked:     no
> Server compiled with....
>  -D APR_HAS_SENDFILE
>  -D APR_HAS_MMAP
>  -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
>  -D APR_HAS_OTHER_CHILD
>  -D AP_HAVE_RELIABLE_PIPED_LOGS
>  -D DYNAMIC_MODULE_LIMIT=256
>  -D HTTPD_ROOT="/apache"
>  -D SUEXEC_BIN="/apache/bin/suexec"
>  -D DEFAULT_PIDLOG="logs/httpd.pid"
>  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
>  -D DEFAULT_ERRORLOG="logs/error.log"
>  -D AP_TYPES_CONFIG_FILE="conf/mime.types"
>  -D SERVER_CONFIG_FILE="conf/httpd.conf"
> 
> 
> Python version & architecture
> >>> import struct
> >>> print(8 * struct.calcsize("P"))
> 64
> >>> import sys; print("Python version: {}\nPython Prefix: 
> >>> {}".format(sys.version
> , sys.prefix))
> Python version: 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit 
> (AMD64
> )]
> Python Prefix: C:\Python27
> 
> 
>  Python is installed for all users (User S-1-5-18):
> 
> c:\Apache24\bin>REG QUERY 
> HKLM\Software\Microsoft\Windows\CurrentVersion\Install
> er\UserData\S-1-5-18\Products\5FD4CC3C5A9372041B63B2E3F1A56B3E\InstallProperties
>  /v DisplayName
> 
> 
> HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\
> S-1-5-18\Products\5FD4CC3C5A9372041B63B2E3F1A56B3E\InstallProperties
>     DisplayName    REG_SZ    Python 2.7.6 (64-bit)
> 
> I have attached access.log, error.log, additional header logging from 
> wsgi.py, my httpd.conf and my wsgi.py files.  I would greatly appreciate some 
> help with tracking this down.
> 
> Dan
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/modwsgi 
> <http://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> <1439496569.41-3428-1.iheaders><access.log><error.log><httpd.conf><wsgi.py>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to