I have deployed a simple Django application in the AWS server and created a config file in the Nginx as follows. But its static files are not detecting. Location of my static folder location: /path/static.
This application checks for static files by the URL HTTP://public_ip/static, but I need to achieve the same in HTTP://public_ip/portal this URL
server {
listen 80;
server_name 127.0.0.1;
location /portal {
include proxy_params;
proxy_pass http://localhost:8000/en;
}
}
You need to have following
server
config:First
location
block checks if a file exists in the path, and serves it. If no file exists, then request is passed to django.