I'm working on running Django + httpd using mod_wsgi.
I've read up the docs and configured httpd.conf as required. I'm running Python2.7 on Centos5.5
I'm getting a strange "syntax" error which looks like a version conflict to me. Any pointers ?
Here are my Apache error logs:
[Tue Aug 27 19:12:01 2013] [error] [client 10.104.22.85] mod_wsgi (pid=32765): Target WSGI script '/home/sbose/PATH/TO/wsgi.py' cannot be loaded as Python module.
[Tue Aug 27 19:12:01 2013] [error] [client 10.104.22.85] mod_wsgi (pid=32765): Exception occurred processing WSGI script '/home/sbose/PATH/TO/wsgi.py'.
[Tue Aug 27 19:12:01 2013] [error] [client 10.104.22.85] Traceback (most recent call last):
[Tue Aug 27 19:12:01 2013] [error] [client 10.104.22.85] File "/home/sbose/PATH/TO/wsgi.py", line 10, in ?
[Tue Aug 27 19:12:01 2013] [error] [client 10.104.22.85] import django.core.handlers.wsgi
[Tue Aug 27 19:12:01 2013] [error] [client 10.104.22.85] File "/usr/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 84
[Tue Aug 27 19:12:01 2013] [error] [client 10.104.22.85] self.buffer = b''
[Tue Aug 27 19:12:01 2013] [error] [client 10.104.22.85] ^
[Tue Aug 27 19:12:01 2013] [error] [client 10.104.22.85] SyntaxError: invalid syntax
UPDATE: I just figured out that Apache was running Python2.4 Also, FYI,I had installed mod_wsgi with yum.
Thanks.