python - nginx not serving django static files -
i'm running django project on amazon ami machine , have problem nginx serving static files. project static folder path /home/user/projectname/app/static
, nginx.conf
is
server { listen 80; location /static { alias /home/user/projectname/app/static; } location / { proxy_pass http://localhost:8000; }
i tried make collectstatic , change static location alias /home/user/static
; didn't help. doing wrong?
make sure chown home directory. makes static files accessible nginx.
chown -r user:user /home chmod -r ug+r /home
also, try running python manage.py collectstatic --noinput
hope solves problem.
Comments
Post a Comment