N
N
nazandr2016-03-28 20:11:50
Django
nazandr, 2016-03-28 20:11:50

apache error Forbidden You don't have permission to access / on this server?

I cloned a Django project from https://github.com/nazandr/Shop
/etc/apache2/sites-available/django-shop.tk.conf

<VirtualHost *:80>
        ServerName django-shop.tk
        ServerAlias www.django-shop.tk
        WSGIScriptAlias / /root/VapeShop/bin/VapeShop/VapeShop/Django-shop.wsgi
</VirtualHost>

sudo nano /etc/apache2/httpd.conf
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so

WSGIScriptAlias / home/andrey/Shop/VapeShop/wsgi.py
WSGIPythonPath /home/andrer/Shop

<Directory /home/andrey/Shop>
<Files wsgi.py>
    #Options FollowSymLinks
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
</Files>
</Directory>

django-shop.wsgi
import os
import sys
sys.path.append('~/Shop/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'VapeShop.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

When following the link, it gives the error
Forbidden
You don't have permission to access / on this server.
Apache/2.4.12 (Ubuntu) Server at django-shop.tk Port 80

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lubezniy, 2016-03-28
@lubezniy

I don’t know if this is the reason or not, but there is a typo in the config in the path:

WSGIPythonPath /home/andrer/Shop

Y
Yuri Chudnovsky, 2016-03-29
@Frankenstine

Reading Apache logs would give you all the information you need about your typos :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question