大家好,我更改了nginx的默认文件,该文件位于/ etc / nginx / sites-available / default中,如下所示:
upstream django {
server 127.0.0.1:8000;
}
server {
listen 80;
location /static/ {
root /home/django/chistaa/chistaa/settings;
try_files $uri =404;
}
location / {
try_files $uri @send_to_django;
}
location @send_to_django {
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://django;
}
}
但是它不会加载我的静态文件。 我怎么了?!