From 2c9184739e1a0674faf4c388fa58ede1fca82e55 Mon Sep 17 00:00:00 2001 From: bserie Date: Thu, 23 Jul 2020 05:43:58 +0200 Subject: [PATCH] proxy apache --- HowtoNetdata.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/HowtoNetdata.md b/HowtoNetdata.md index 48eaa978..2f2418a8 100644 --- a/HowtoNetdata.md +++ b/HowtoNetdata.md @@ -17,4 +17,26 @@ title: Howto Netdata ## Accès -L'accès par défaut se fait sur le port 19999. \ No newline at end of file +L'accès par défaut se fait sur le port 19999. Ou bien on peut configurer un reverse proxy Apache ou Nginx. + +### Accès via Apache + +~~~ + RewriteEngine On + ProxyRequests Off + ProxyPreserveHost On + + + Require all granted + + + # Local Netdata server accessed with '/netdata/', at localhost:19999 + ProxyPass "/netdata/" "http://localhost:19999/" connectiontimeout=5 timeout=30 keepalive=on + ProxyPassReverse "/netdata/" "http://localhost:19999/" + + # if the user did not give the trailing /, add it + # for HTTP (if the virtualhost is HTTP, use this) + RewriteRule ^/netdata$ http://%{HTTP_HOST}/netdata/ [L,R=301] + # for HTTPS (if the virtualhost is HTTPS, use this) + #RewriteRule ^/netdata$ https://%{HTTP_HOST}/netdata/ [L,R=301] +~~~ \ No newline at end of file