Django | Error 403 "Forbidden You don't have permission to access this resource"

Keywords: Django - AWS - Technical issue - Permissions
bnsupport ID: 98c5e367-aacb-99ac-d699-f068877a75ed
Hi bitnami team,

Before creating this ticket, I've tried many solutions on this forums and stackoverflow and I still have this restriction.

I have created a Django app hosted by AWS lightsail. I've followed this tutorial : "" for the launch. Everything works when I use the django server on : http://SERVER-IP:3030.

I've followed the step 2. Serve Your Application Through The Apache Web Server and choosed the: Approach B: Self-Contained Bitnami Installations.

But I have a 403( Forbidden You don't have permission to access this resource.) error when I go to http://SERVER-IP.

My app is stored : /opt/bitnami/apps/Django-API-Website

This is my app tree:



In my backend/settings/

'''Use this for staging'''

from .base import *

DEBUG = False
WSGI_APPLICATION = 'backend.wsgi.stag.application'

    'default': {
        'ENGINE': get_secret('ENGINE'),
        'NAME': get_secret('NAME_STAG'),
        'USER': get_secret('USER_STAG'),
        'PASSWORD': get_secret('PASSWORD_STAG'),
        'HOST': get_secret('HOST_STAG'),
        'PORT': get_secret('PORT'),

        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',

In my backend/wsgi/

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings.stag')

application = get_wsgi_application()

In my conf/httpd-app.conf

    WSGIDaemonProcess wsgi-djangostack   processes=2 threads=15    display-name=%{GROUP}

<Directory "/opt/bitnami/apps/Django-API-Website/backend">
    Options +MultiViews
    AllowOverride All

    <IfVersion >= 2.3>
        Require all granted

    WSGIProcessGroup wsgi-djangostack
    WSGIApplicationGroup %{GLOBAL}

Alias /Django-API-Website/static "/opt/bitnami/apps/django/lib/python3.8/site-packages/Django-3.0.8-py3.8.egg/django/contrib/admin/static"

WSGIScriptAlias /Django-API-Website '/opt/bitnami/apps/Django-API-Website/backend/wsgi/'


In my conf/httpd-prefix.conf

Include "/opt/bitnami/apps/Django-API-Website/conf/httpd-app.conf"

In my **/opt/bitnami/apache2/logs/error_log **

AH01630: client denied by server configuration: /opt/bitnami/projects, referer: http://SERVER-IP/

I also run the bitnami support tool : 98c5e367-aacb-99ac-d699-f068877a75ed

Thank's for your time


Hi @jonathan.pagani,

I think this path is wrong, you should be pointing to the static files inside your project

Alias /Django-API-Website/static "/opt/bitnami/apps/Django-API-Website/static"

and restart Apache later.

Hi @jota,

Thank's for your reply.

Yes my path was wrong, but after change, I still have the 403 error.

In the documentation part B, they said (think there is typo for apache22 instead of apache2 :slight_smile: ):

but in there is no httpd-prefix.conf to add this line. Do I have to create this file ? This file may cause the 403 error?


Hi @jonathan.pagani,

This user had a similar issue, can you take a look at the information in his thread?

Yes, there is a typo, it's apache2. But you are using the latest available version so you must follow the Approach A instructions.

Hi @jota,

I tried the approach A and everything works.

You can close the case.


1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Thanks for the feedback, we have fixed the typo in