S
S
S4dPanda2015-06-05 12:55:03
Django
S4dPanda, 2015-06-05 12:55:03

How to force nginx to find static files?

There is a project on django, which is located on the amazon ec2 server and I can't connect statics to it. The project itself is located in /home/user/projectname/, the statics are in /home/user/projectname/app/static, and the code for the host settings is

server {
listen       80;

location /static {
    alias /home/user/projectname/app/static;
}

location / {
    proxy_pass http://localhost:8000;
}

Tried to change alias to
alias /home/mrukhlov/lingsite/inputs/staticstorage;
and alias /home/mrukhlov/static;, but it did not help, despite the fact that earlier the project was on the vds-server and there were no problems with this.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
S4dPanda, 2015-06-05
@S4dPanda

Moving from /home/ folder helped.

I
Ivan, 2015-06-05
@ATNC

collectstatic did?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question