Deploying Django Rest API Service with AWS

1.3k Views Asked by At

I am trying to deploy a Django REST API service.

I got the example given working and so I cloned my git repo into a folder and edited the .conf file to match all the paths that needed to be corrected. But then when I deployed my app and went to the public IP, it gives me a 403 saying I don't have permission to access / on the server (or anything else). What I am confused about is that I got the example one working and so it does not have anything to do with permissions of my home directory like everyone else is saying on StackOverflow. I don't know what other permissions might be off and if someone could point me in the right direction that would be great.

By the way, this is my .conf file

WSGIScriptAlias / /home/ubuntu/test_site.com/api/project/wsgi.py
WSGIPythonPath /home/ubuntu/test_site.com/api
<Directory /home/ubuntu/test_site.com/api/api>
    <Files wsgi.py>
        Order deny,allow
        Require all granted
    </Files>
</Directory>
<Directory /home/ubuntu/test_site.com/api/static>
    Require all granted
</Directory>
<Directory /home/ubuntu/test_site.com/api/media>
    Require all granted
</Directory>
0

There are 0 best solutions below