On 08/17/06 18:38, Fabien Schwob wrote: >> It'd be a great help if you pasted the errors from Apache's error log. >> Also, what kind of 403 errors do you get -- could you include a link >> to a screenshot? > > In the error log I get : > [Thu Aug 17 18:31:01 2006] [error] [client 86.73.128.192] > (13)Permission denied: cannot read directory for multi: > /home/cocoa/www/, referer: http://www.cocoa.fr/ > > And to see the front error : > http://www.cocoa.fr/lieux/ >
http://defindit.com/readme_files/apache_13_error.html I would try to simplify the setup, e.g. nuke the DocumentRoot and PHP related stuff. See if it works with only what's absolutely required for django to work. Then start adding stuff, testing after every change. For what it's worth attached is the relevant parts of a working django setup. Maybe that helps. Good luck --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---
Django is installed under: /usr/local/lib/python/django DocumentRoot is: /var/www/www.example.com/htdocs Site media is at: /var/www/www.example.com/htdocs/media The custom django project (named foo) is located at: /var/www/www.example.com/foo With settings at: /var/www/www.example.com/foo/settings.py My user/group is: me:mygroup Apache runs as user/group: apache:apache Apache VirtualHost config: -------------------- <VirtualHost *> ServerName www.example.com DocumentRoot /var/www/www.example.com/htdocs DirectoryIndex index.html LogLevel debug CustomLog /var/www/www.example.com/logs/access.log combined ErrorLog /var/www/www.example.com/logs/error.log <Directory /var/www/www.example.com/htdocs> Options -All -Multiviews +FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Location /> SetHandler python-program PythonInterpreter foo PythonPath "['/var/www/www.example.com'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE foo.settings PythonDebug On </Location> <LocationMatch "\.(jpe?g|gif|png|pdf|zip)$"> SetHandler None </LocationMatch> Alias /media /var/www/www.example.com/htdocs/media/ <Location /media> SetHandler None </Location> <Directory /var/www/www.example.com/htdocs/media> Options -All -Multiviews AllowOverride None Order allow,deny Allow from all SetHandler None </Directory> Alias /admin_media /usr/local/lib/python/django/django/contrib/admin/media/ <Location /admin_media> SetHandler None </Location> <Directory /usr/local/lib/python/django/django/contrib/admin/media> Options -All -Multiviews AllowOverride None Order allow,deny Allow from all SetHandler None </Directory> </VirtualHost> Directory permissions: -------------------- $ la /var/www/www.example.com/ total 1 drwxr-xr-x 5 me root 128 Jun 16 01:12 . drwxr-xr-x 20 root root 632 Jun 16 01:09 .. drwxr-xr-x 2 me mygroup 48 Jun 16 01:43 htdocs drwxr-xr-x 2 apache mygroup 112 Jun 16 01:30 logs drwxr-xr-x 7 me mygroup 744 Jun 16 02:10 foo $ la /var/www/www.examle.com/foo/ total 77 drwxr-xr-x 7 me mygroup 744 Jun 16 02:10 . drwxr-xr-x 5 me root 128 Jun 16 01:12 .. -rw-r--r-- 1 me mygroup 0 Jun 16 00:55 __init__.py -rw-r--r-- 1 me mygroup 104 Jun 16 02:10 __init__.pyc -rw-r--r-- 1 me mygroup 104 Jun 16 02:10 __init__.pyo drwxr-xr-x 10 me mygroup 352 Jun 16 02:10 apps drwxr-xr-x 2 apache mygroup 80 Jun 25 21:07 db drwxr-xr-x 4 me mygroup 128 Jun 16 01:06 htdocs -rwxr-xr-x 1 me mygroup 546 Jun 16 00:55 manage.py -rw-r--r-- 1 me mygroup 699 Jun 16 02:10 manage.pyc -rw-r--r-- 1 me mygroup 699 Jun 16 02:10 manage.pyo -rw-r--r-- 1 me mygroup 3408 Jun 16 00:55 settings.py -rw-r--r-- 1 me mygroup 3086 Jun 16 02:10 settings.pyc -rw-r--r-- 1 me mygroup 3086 Jun 16 02:10 settings.pyo -rw-r----- 1 me apache 376 Jun 16 01:34 settings_local.py -rw-r----- 1 me apache 424 Jun 16 02:10 settings_local.pyc -rw-r----- 1 me apache 424 Jun 16 02:10 settings_local.pyo drwxr-xr-x 10 me mygroup 288 Jun 16 02:15 templates -rw-r--r-- 1 me mygroup 1520 Jun 16 01:28 urls.py -rw-r--r-- 1 me mygroup 1577 Jun 16 02:10 urls.pyc -rw-r--r-- 1 me mygroup 1577 Jun 16 02:10 urls.pyo -rw-r--r-- 1 me mygroup 3998 Jun 16 00:55 utils.py -rw-r--r-- 1 me mygroup 4454 Jun 16 02:10 utils.pyc -rw-r--r-- 1 me mygroup 4396 Jun 16 02:10 utils.pyo Note: apache user needs write access to the folder 'db' cause I'm using sqlite and the db is in that folder. All sensitive config is in settings_local.py which get's included by 'from settings_local import *' at the end of settings.py. I usually precompile all python code so apache doesn't need write access to my project directory using the script below. $ cat ~/bin/python-compile #!/bin/bash # # Recursively compiles all Python code in the given directory. # # Usage: # python-compile /path/to/some/folder # PYTHON_HOME=/usr/lib/python2.4 # normal /usr/bin/python ${PYTHON_HOME}/compileall.py -q $@ # optimized /usr/bin/python -O ${PYTHON_HOME}/compileall.py -q $@