本文讲述如何使用nginx代理kibana
1、更改kibana.yml文件添加前缀
2、nginx添加配置
location /kibana/ { proxy_pass http://127.0.0.1:5601/; rewrite ^/elk/(.*)$ /$1 break; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; }
3、重启nginx即可
nginx -t nginx -s reload