nginx 代理django样式错乱,我改如何修改配置配置
nginx配置
events {
worker_connections 1024;
}
http{
upstream kzjzserver {
server 127.0.0.1:8008; # for a web port socket (we'll use this first)
}
# configuration of the server
server {
# the port your site will be served on
listen 8888;
# the domain name it will serve for
server_name 1; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass kzjzserver;
include /www/jzjzserver/uwsgi_params;
}
location /static/ {
alias /www/jzjzserver/static/;
}
}
}
部署目录
项目访问地址 http://47.95.151.110:8888/
目前看你贴出的ip地址,看到样式没有错乱,是不是缓存的原因,你可以在浏览器设置禁用缓存+清除缓存并刷新
原因
打开看了下,没有看见有问题,样式看起来都是正常的
大概率额可能是浏览器缓存导致的
解决方法
1、打开无痕窗口来进行查看(这样可以解决浏览器缓存问题)
或者
2、清空浏览器缓存 然后刷新重进
如有问题及时沟通
你的样式文件之类是没有丢失的,相关路径也是对的,调试中看到所有涉及的文件都获取到了啊!
会不会是其它原因?
django 常见问题
https://blog.csdn.net/ailinyingai/article/details/100331002