hi trying to get a nginx+gunicorn+django site up and running /it works well in development mode no errors or anything.configured the nginx for deployment with the following params
upstream my-backend {
server localhost:8000 fail_timeout=0;
}
server {
listen 80;
root /home/wakwanza/Cod/NP/ASUT;
keepalive_timeout 5;
location /site_media/ {
autoindex on;
access_log off;
}
location /static/ {
autoindex on;
access_log off;
}
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE_HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-FORWARDED-PROTOCOL $scheme;
proxy_redirect off;
proxy_pass http://my-backend;
}
}
my gunicorn is being called from within the django app with: python manage.py run_gunicorn i did this after collecting my static files into .../ASUT/site_media/static only works in the dev mode tho . i have tried substituting the location directive with
location /static/ {
autoindex on;
access_log off;
alias /home/wakwanza/Cod/NP/ASUT/site_media/;
}
but my static assets are still not geting served all css/js/img folders arent getting seen for the normal site however for the admin section they show up ok.
sorted it by changing in settings.conf
and nginx.conf to