django - 如何使用 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;
}
}```
解决方案
推荐阅读
- javascript - 如何在 vue.js 欢迎组件中使用引导程序而不是尾风 CSS
- javascript - JS LocalStorage 问题
- r - 想要使用 gls 获取系数、se 和 t-stat,但它们没有显示在输出中
- c# - CommandLineParser - 如果没有给出开关,则显示 --help 结果
- django - 使用 ModelSerializer 保存嵌套多对多关系的问题
- python - LSTM模型在多类分类中只分类1类
- wordpress - 使用带有 elementor/divi 的 wordpress 扩展网站
- google-chrome - Vuetify:禁用 chrome 中的自动完成功能
- python - 在 COM 端口上写入和读取 bytearray
- powershell - 在不使用向上箭头的情况下获取最后执行的命令作为输出 - PowerShell