Thanks for the message.
I switched over to posix style paths in wsgi.py. I added trailing slashes
to the paths you mentioned below, and I restarted apache. Once again, both
on page load and connecting via telnet, there is no response or error
message. Chrome simply shows the page load spinner forever, and telnet
with GET / HTTP/1.0 never returns any response either.
When I comment out the WSGIScriptAlias I can access the webserver just
fine, and when I load a sample WSGI application in the same wsgi.py file I
get the following response:
HTTP/1.1 200 OK
Date: Wed, 02 Sep 2015 19:11:51 GMT
Server: Apache/2.4.16 (Win64) mod_wsgi/4.4.12 Python/2.7.6
Content-Length: 12
Vary: Accept-Encoding
Connection: close
Content-Type: text/plain; charset=utf-8
Hello World!
Connection to host lost.
Note that when I load the django application and try to access the server,
this is the entire apache error log:
[Wed Sep 02 15:08:05.517393 2015] [wsgi:warn] [pid 3828:tid 296] mod_wsgi:
Compiled for Python/2.7.9+.
[Wed Sep 02 15:08:05.518393 2015] [wsgi:warn] [pid 3828:tid 296] mod_wsgi:
Runtime using Python/2.7.6.
[Wed Sep 02 15:08:05.520392 2015] [mpm_winnt:notice] [pid 3828:tid 296]
AH00455: Apache/2.4.16 (Win64) mod_wsgi/4.4.12 Python/2.7.6 configured --
resuming normal operations
[Wed Sep 02 15:08:05.520392 2015] [mpm_winnt:notice] [pid 3828:tid 296]
AH00456: Server built: Jul 13 2015 10:08:03
[Wed Sep 02 15:08:05.520392 2015] [mpm_winnt:info] [pid 3828:tid 296]
AH80000: Distributed by: The Apache Haus
[Wed Sep 02 15:08:05.520392 2015] [mpm_winnt:info] [pid 3828:tid 296]
AH80001: Compiled with: Visual Studio 2008
[Wed Sep 02 15:08:05.520392 2015] [core:notice] [pid 3828:tid 296] AH00094:
Command line: 'httpd.exe -d C:/Apache24'
[Wed Sep 02 15:08:05.521392 2015] [mpm_winnt:notice] [pid 3828:tid 296]
AH00418: Parent: Created child process 1516
[Wed Sep 02 15:08:05.737305 2015] [wsgi:warn] [pid 1516:tid 168] mod_wsgi:
Compiled for Python/2.7.9+.
[Wed Sep 02 15:08:05.738305 2015] [wsgi:warn] [pid 1516:tid 168] mod_wsgi:
Runtime using Python/2.7.6.
[Wed Sep 02 15:08:05.740304 2015] [wsgi:info] [pid 1516:tid 168] mod_wsgi (
pid=1516): Initializing Python.
[Wed Sep 02 15:08:05.759296 2015] [wsgi:info] [pid 1516:tid 168] mod_wsgi (
pid=1516): Attach interpreter ''.
[Wed Sep 02 15:08:05.760296 2015] [wsgi:info] [pid 1516:tid 168] mod_wsgi (
pid=1516): Adding 'C:/sensei/development' to path.
[Wed Sep 02 15:08:05.768293 2015] [mpm_winnt:notice] [pid 1516:tid 168]
AH00354: Child: Starting 64 worker threads.
[Wed Sep 02 15:08:24.838662 2015] [wsgi:info] [pid 1516:tid 872] mod_wsgi (
pid=1516): Create interpreter 'randev02.*********|'.
[Wed Sep 02 15:08:24.838662 2015] [wsgi:info] [pid 1516:tid 872] mod_wsgi (
pid=1516): Adding 'C:/sensei/development' to path.
[Wed Sep 02 15:08:24.840661 2015] [wsgi:info] [pid 1516:tid 872] [client
10.1.200.75:52772] mod_wsgi (pid=1516, process='', application=
'randev02.*********|'): Loading WSGI script
'C:/sensei/development/sensei_web/wsgi.py'.
I don't have any clear ideas about how to move forward on this, so I'd
appreciate any input.
Dan
On Thursday, August 13, 2015 at 7:38:33 PM UTC-4, Graham Dumpleton wrote:
>
> 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] <javascript:>>
> 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] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit 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.