Hello,
First timer here… and it seems to be a common issue? I’ve been slogging through this for the last 3 days, and just can’t get static to load using nginx on EC2.
Here is my setup.
settings.py static:
STATIC_ROOT = '/var/www/too_hard/static'
STATIC_URL = '/static/'
path to static using pwd:
/var/www/too_hard/static
nginx conf file:
include /etc/nginx/mime.types;
server{
listen 80;
server_name 35.90.14.213;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
autoindex on;
alias /var/www/too_hard/static/;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/ubuntu/too_hard/too_hard/app.sock;
}
}
I have already run collectstatic into the var/www/too_hard/static folder.
It seems the CSS from Django’s default View classes are working, but any other css like the nav bar is not. Please advise.