Nginx
反向代理配置:
location / {
include /etc/nginx/naxsi_hsp.rules;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_connect_timeout 60;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_pass http://192.xx.xx.xx:17000;
}
location ^~ /api/n9e {
include /etc/nginx/naxsi_hsp.rules;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_connect_timeout 60;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_pass http://192.xx.xx.xx:17000/api/n9e;
使用反向代理地址查看监控大盘:
前端页面报错:
Unexpected token '<', "<!-- ~ C"... is not valid JSON
感觉像是定义的变量抛出的异常:
直接使用目标服务器地址访问没有任何问题: