如果没有配置proxy_set_header的话
首页中图表将无法正常显示
nginx参考配置
server {
add_header Access-Control-Allow-Origin * always;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS, DELETE';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,systemName,userId,userName,token,Content-Disposition';
listen 7181 ;
server_name cmf;
location / {
proxy_pass http://你的服务器ip:7180;
proxy_set_header Host $host:$server_port;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}