Dear All
I know this is strictly speaking off topic, so please forgive me. I
have asked at the mod_wsgi list.
On an Ubuntu machine I have a working django site, using nginx, apache
and mod_wsgi. Now I am having to install the site on a CentOS machine.
Everything is working, apart form one thing: apache is returning 403
permission denied when I try to access the wsgi script.
I have carefully followed the mod_wsgi installation and configuration
instructions, and scoured the blogs, forums, and wikis of the web. I
have tried many things, but nothing will shift that 403.
Below is a summary of the install and config steps I took and the fixes
I've tried. Can anyone suggest anything I've missed?
Can anyone suggest to me which permissions I need to change and to
what? Presumably read/write permissions to some file or directory but
which one(s)?
Please let me know if you need more information.
Can anyone help? Unfortunately, I think we have to stick with CentOS.
With apologies, thanks and best wishes
Ivan
* What I did
As CentOS uses python 2.4, I installed python 2.6 into /opt. I compiled
from source using the following configure:
./configure --prefix=/opt --enable-ipv6 --with-threads --enable-shared
I made the libpython so available
$ cd /opt/lib/python2.6/config
$ ln -s ../../libpython2.6.so .
$ cat >> /etc/ld.so.conf.d/opt-python2.6.conf
/opt/lib<enter>
^D
$ ldconfig
$ cp /etc/ld.so.conf.d/opt-python2.6.conf /etc/ld.so.conf.d/python2.6.conf
(added later; just in case)
When compiling mod_wsgi from source I used the following configure:
./configure --with-python=/opt/bin/python
The resulting mod_wsgi.so is about 395k and is loading the python so:
# ls -l mod_wsgi.so
-rwxr-xr-x 1 root 385009 Apr 29 11:44 mod_wsgi.so
# ldd mod_wsgi.so
libpython2.6.so.1.0 => /opt/lib/libpython2.6.so.1.0
(0x00002b249eec0000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b249f26f000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b249f48a000)
libutil.so.1 => /lib64/libutil.so.1 (0x00002b249f68f000)
libm.so.6 => /lib64/libm.so.6 (0x00002b249f892000)
libc.so.6 => /lib64/libc.so.6 (0x00002b249fb15000)
/lib64/ld-linux-x86-64.so.2 (0x0000003dd1000000)
The django app and its django_wsgi.py wgi script are outside of document
root. django_wsgi.py has permissions 755, as does its containing directory.
Here are some relevant apache configs I'm using:
NameVirtualHost *:8080
Listen 127.0.0.1:8080
LoadModule wsgi_module modules/mod_wsgi.so
AddHandler wsgi-script .wsgi
WSGISocketPrefix run/wsgi
WSGIPythonHome /home/path/to/py26/sys/prefix
<VirtualHost *:8080>
# ...
WSGIScriptAlias / /path/to/django/app/apache/django_wsgi.py
<Directory /path/to/django/app/apache>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
The error in apache's error logs is just:
[error] [client 127.0.0.1] (13)Permission denied: access to / denied
And it's the same error with LogLevel set to info.
I have tried disabling selinux: no effect.
I have tried switching the CentOS machine off and on again: no effect.
I have tried the example wsgi script in the mod_wsgi wiki quick
configuration page: still a 403.
I have not tried daemon mode: sounds good but doesn't look like it would
address my current problem.
--
============================================================
Ivan A. Uemlianin
Speech Technology Research and Development
i...@llaisdy.com
www.llaisdy.com
llaisdy.wordpress.com
www.linkedin.com/in/ivanuemlianin
"Froh, froh! Wie seine Sonnen, seine Sonnen fliegen"
(Schiller, Beethoven)
============================================================
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.