flask项目部署nginx后静态文件不显示的解决办法
Win10下,进入nginx.conf,在监听的server下加入
location /static {
alias C:\Users\ganyuning\Desktop\flask-test\static;
}
Linux下:sudo vim /etc/nginx/nginx.conf
也是在server中加入
location /static {
alias “static路径”;
}
赞 (0)
Win10下,进入nginx.conf,在监听的server下加入
location /static {
alias C:\Users\ganyuning\Desktop\flask-test\static;
}
Linux下:sudo vim /etc/nginx/nginx.conf
也是在server中加入
location /static {
alias “static路径”;
}