1👍
✅
Instead of Nginx, it is because of your Django static configuration. You need , static and media files to be served from different directories.
Create two directories (the directories "/home/egor/mysite/mypro-project/static" and "/home/egor/mysite/mypro-project/media" exist ) if not there already and update your Nginx configuration as follows:
server {
listen 80;
server_name joshna.co www.joshna.co joshna.net www.joshna.net;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
alias /home/bsyal/mysite/mypro-project/static/;
}
location /media/ {
alias /home/bsyal/mysite/mypro-project/media/;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
}
Source:stackexchange.com