djangolinuxapacheubuntulinode

What is causing the '403 Forbidden error' in my Apache2 server? And how can I fix it? The available fixes on the web are not working for me


A little bit of context to my problem... I'm trying to deploy my django application following a tutorial (https://www.youtube.com/watch?v=Sa_kQheCnds) which uses linode to setup a linux apache server, and after following the steps, it always results in the same error, 403 Forbidden: You don't have permission to access this resource. I've followed the steps in this guide roughly 6 times now and I've determined that I'm definitely not doing anything the guy didn't do.

Something worth mentioning is that in the tutorial, Ubuntu 18.10 is being used, however I don't have Ubuntu 18.10 available, so I've tried it using Ubuntu 18.04, 20.04 and 21.10.

In my sixth and latest attempt, I am using Ubuntu 21.10

I've also tried running the server with DEBUG=True to see if I can get a little more insight on the error, but it just displays the following:

the error

The tutorial is very long so I've broken down every single step in this post.

The steps I had to follow are:

(everything done in the Windows Linux Bash shell)

Please, I'd appreciate any kind of help. I have to fix this error for a school project and I can't find solutions that actually fix it. I've read in some forums that I just needed to change certain permissions again, I did that and still the same error. It's really driving me crazy.


Solution

  • I've found a solution, for now at least. I ran a sudo chmod 777 on my home folder so that literally every single file is accessible. I heard that this solution was not recommendable, but for now it will do.

    I still don't know why other solutions that were posted didn't work for me, because it was of my understanding that every file that was needed to fun the server was inside the django_project folder.

    I will be looking into it a bit more though, because I don't know how secure it is to have everysingle file with permisions.