I'm setting up an AWS server and I finished the tutorial provided by DigitalOcean, however my server doesn't recognize my static files and displays a page with styles only via CDN (Tailwind)
Nginx Configuration:
server {
listen 80;
server_name xxxxxxxxxxxxx;
location = /favicon.ico { access_log off; log_not_found off; }
location /static {
alias /home/ubuntu/Filmes/static;
}
location /media {
root /home/ubuntu/Filmes;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
}
My project settings.py
:
import os
STATIC_URL = 'static/'
STATIC_ROOT = os.path.join(BASE_DIR / "static")
Structure when running python manage.py collectstatic
:
- static
|------ admin
|------ css
|------ images
|------ js
|------ staticfiles.json