I recieve this issue after i visit my domain.com. I've in comparison this with my other website using the SAME set-up (just different username!!!) For whatever reason this website works and that one does not.
Forbidden You don't have permission to access / on this server. Apache/2.2.3 (Red Hat) Server at www.mydomain.com Port 80
When it comes to permission issues, I've added user "apache" towards the group "dver" and "svn" that own the folders that things are situated on.
$ ls -l total 4 drwxr-xr-x 4 dver svn 4096 Oct 13 19:49 tv
This really is my django.wsgi:
import os import sys sys.path.append('/home/dver/tv') os.environ['PYTHON_EGG_CACHE'] = '/home/dver' os.environ['DJANGO_SETTINGS_MODULE'] = 'mtv.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()
This really is during my httpd.conf:
WSGIScriptAlias / /home/dver/tv/mtv/wsgi/django.wsgi DocumentRoot "/home/dver/tv/mtv/" Alias /media/ /home/dver/tv/mtv/media/ <Directory /home/dver/tv/mtv/media> Order deny,allow Allow from all </Directory> <Directory /home/dver/tv/mtv> Order deny,allow Allow from all </Directory>
If anybody might help me I'll really be thankful.
Because the code will run because the Apache user, all sites in the cause of the file system lower to '/home/dver/tv/mtv/wsgi' should be readable/executable to others, or at best in some way the Apache user, not only your Django site directory.
Thus, if '/home/dver' has permissions 'rwxr-x---' then it won't work. This is actually the most typical problem where people go and stick the WSGI script file under their very own home account. Adjusting groups may go, however, you don't indicate in the event that group possession also is applicable to '/home/dver'.
Although it won't matter as describes a parent or gaurdian directory, but safer to possess:
<Directory /home/dver/tv/mtv/wsgi> Order deny,allow Allow from all </Directory>
That's, use '/home/dver/tv/mtv/wsgi' instead of '/home/dver/tv/mtv'.
Another possibility is you have SELinux extensions enabled for os's. You need to configure SELinux properly if it's, or even disable it simply to ascertain if after that it works.
You will find three potential issues which i notice.
The very first is dependent around the OS you are running — are you certain the consumer you need to increase the groups is known as
apache and never
The second reason is you have your wsgi script underneath the directory
wsgi but you've got no
Directory definition for this. I'd include that and check out again.
The 3rd is your
/home/dver egg directory may have the incorrect permissions.