On Jul 27, 5:02 pm, Parag Shah <adapti...@gmail.com> wrote:
> Hello,
>
> I am trying to configure Apache2 server with mod_wsgi for my Django
> application. However when I try to access the website I get the following
> msg on the browser:
>
> Forbidden
>
> You don't have permission to access / on this server.
>
> Here are the contents of my httpd.conf which has been setup to access
> mod_wsgi
>
> --------------------------------------------------------------------------- 
> -------------
>
> <Directory /root/public_html/projects/adaptivelearning/apache>
> Order allow,deny
> Allow from all
> </Directory>
>
> WSGIScriptAlias /
> /root/public_html/projects/adaptivelearning/apache/django.wsgi
> --------------------------------------------------------------------------- 
> -------------
> Apache is running as www-data user.
> When I look into my Apache error.log file I see the following line:
>
>  (13)Permission denied: /root/.htaccess pcfg_openfile: unable to check
> htaccess file, ensure it is readable
>
> I do not have a .htaccess file in /root, but I do not understand why Apache
> is looking for /root/.htaccess
>
> Am I missing something in the configuration? Thanks in advance for the help.

Apache runs as www-data user. That user must have read access to
directories from / down to directory where your WSGI application
script file is. The error above suggests that directory '/root' is not
readable to the www-data user. In other words, permissions of the
directory are likely something like 'rwxr-x---'. So, no o+rx.

Technically you can get away with o+x in circumstances where Apache
doesn't need a directory browsing ability.

Graham


--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to