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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -