Forbidden. You don't have permission to access this resource. (Django Apache2)

I am trying to deploy my Django project through Ubuntu Apache2 but I am getting Forbidden You don't have permission to access this resource error. I cannot seem to find the solution

Error: Server Error

My config file


`Alias /static /home/rapicare/rapid-care-website/rapidCare/static <Directory /home/rapicare/rapid-care-website/rapidCare/static> Require all granted

    Alias /media /home/rapicare/rapid-care-website/rapidCare/media
    <Directory /home/rapicare/rapid-care-website/rapidCare/media>
            Require all granted
    </Directory>

    <Directory /home/rapicare/rapid-care-website/rapidCare/rapidCare>
            <Files wsgi.py>
                    Require all granted
            </Files>
    </Directory>

    WSGIDaemonProcess django_app python-path=/home/rapicare/rapid-care-website/rapidCare python-home=/home/rapicare/rapid-care-website/venv
    WSGIProcessGroup django_app
    WSGIScriptAlias / /home/rapicare/rapid-care-website/rapidCare/rapidCare/wsgi.py`

My Directoy permissions


rapidcare@rapidcare:~$ ls rapid-care-website -la total 28 drwxrwxr-x 5 rapidcare www-data 4096 Feb 5 09:11 . drwxr-x--x 5 rapidcare rapidcare 4096 Feb 5 16:48 .. -rw-rw-r-- 1 rapidcare rapidcare 0 Feb 4 11:52 .editorconfig drwxrwxr-x 8 rapidcare rapidcare 4096 Feb 5 09:14 .git -rw-rw-r-- 1 rapidcare rapidcare 651 Feb 4 11:52 .gitignore drwxrwxr-x 7 rapidcare www-data 4096 Feb 4 22:12 rapidCare -rw-rw-r-- 1 rapidcare rapidcare 249 Feb 4 11:52 requirements.txt drwxrwxr-x 5 rapidcare www-data 4096 Feb 4 22:12 venv

rapidcare@rapidcare:~/rapid-care-website$ ls -la rapidCare/ total 388 drwxrwxr-x 7 rapidcare www-data 4096 Feb 4 22:12 . drwxrwxr-x 5 rapidcare www-data 4096 Feb 5 09:11 .. -rw-rw-r-- 1 rapidcare www-data 360448 Feb 4 12:55 db.sqlite3 -rwxrwxr-x 1 rapidcare rapidcare 665 Feb 4 11:52 manage.py drwxrwxr-x 3 rapidcare www-data 4096 Feb 4 11:52 media drwxrwxr-x 3 rapidcare rapidcare 4096 Feb 5 16:42 rapidCare drwxrwxr-x 7 rapidcare rapidcare 4096 Feb 4 22:12 services drwxrwxr-x 8 rapidcare rapidcare 4096 Feb 4 22:12 static drwxrwxr-x 6 rapidcare rapidcare 4096 Feb 4 22:12 userAuth]]


My Apache Status


`● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled) Active: active (running) since Sun 2023-02-05 17:08:43 UTC; 8min ago Docs: https://httpd.apache.org/docs/2.4/ Process: 113195 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS) Main PID: 113199 (apache2) Tasks: 56 (limit: 1116) Memory: 12.9M CPU: 4.412s CGroup: /system.slice/apache2.service ├─113199 /usr/sbin/apache2 -k start ├─113201 /usr/sbin/apache2 -k start └─113202 /usr/sbin/apache2 -k start

Feb 05 17:08:43 rapidcare systemd[1]: Stopped The Apache HTTP Server. Feb 05 17:08:43 rapidcare systemd[1]: apache2.service: Consumed 12.560s CPU time. Feb 05 17:08:43 rapidcare systemd[1]: Starting The Apache HTTP Server... Feb 05 17:08:43 rapidcare apachectl[113198]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 139.59.20.219. Set the 'ServerName' directive globally to suppress this message Feb 05 17:08:43 rapidcare systemd[1]: Started The Apache HTTP Server.`


I am following https://www.youtube.com/watch?v=Sa_kQheCnds&list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p&index=13&ab_channel=CoreySchafer tutorial. I have tried many other settings but it is still giving error. Someone suggested binding to ports under 1024 requires superuser privileges but I don't know how that works.

Back to Top