nginx 不会将 favicon.ico 的请求转发给反向代理后面的网站程序,需要在 server 中设置 root 目录:
favicon.ico
server
root
server { root /path/to/your/wwwroot; # 确保此路径指向包含 favicon.icon 的目录 }
最后检验配置、重启 nginx:
nginx -t nginx -s reload