首页 > 解决方案 > 如何使用 NGINX 更新 css/scss 文件

问题描述

我正在使用 Gunicorn 和 NGINX 运行 Digital Ocean 液滴。我可以查看我的网页,但无法更新 html/css/scss。

我已经按照另一篇文章的建议添加include /etc/nginx/mime.types;了。/etc/nginx/nginx.conf还尝试 python manage.py collectstatic并收到以下内容:0 static files copied to '/home/ubuntuadmin/pyapps/nomad/static', 177 unmodified

sudo nano /etc/nginx/sites-available/nomad>>>


   server {
    listen 80;
    server_name 157.245.0.153;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /home/ubuntuadmin/pyapps/nomad;
    }

   location /media/ {
        root /home/ubuntuadmin/pyapps/nomad/;
    }

    location / {
        include proxy_params;
        proxy_pass http://unix:/run/gunicorn.sock;
        include /etc/nginx/mime.types;
    }
}```

标签: djangoubuntunginx

解决方案


推荐阅读