From 58d2868fa716382ed281e7a7e710416b091455c3 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 29 Dec 2018 17:59:50 +0100 Subject: Add netdata snippet. --- apache2/conf-available/local-netdata.conf | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 apache2/conf-available/local-netdata.conf (limited to 'apache2') diff --git a/apache2/conf-available/local-netdata.conf b/apache2/conf-available/local-netdata.conf new file mode 100644 index 0000000..bd3a6ef --- /dev/null +++ b/apache2/conf-available/local-netdata.conf @@ -0,0 +1,56 @@ +# Apache2 snippet to proxy netdata service +# +# example uses: +# +# +# ServerName simple.example.org +# +# Include conf-available/local-netdata.conf +# +# +# +# ServerName complex.example.org +# +# Define _NETDATA_SOCKET /var/lib/netdata/netdata.socket +# +# DefineExternalAuth pwauth pipe /usr/sbin/pwauth +# +# AuthType Basic +# AuthName "Netdata service access" +# AuthBasicProvider external +# AuthExternal pwauth +# AllowOverride None +# Require valid-user +# +# +# Include conf-available/local-netdata.conf +# +# UnDefine _NETDATA_SOCKET +# UnDefine _NETDATA_PORT +# UnDefine _NETDATA_PREFIX +# + +# Netdata port to proxy into (fake, if Unix socket also provided) + + Define _NETDATA_PORT 19999 + + +# path prefix + + Define _NETDATA_PREFIX /netdata + + + + + ProxyPass unix:${_NETDATA_SOCKET}|http://localhost:${_NETDATA_PORT}/ connectiontimeout=5 timeout=30 keepalive=on + ProxyPassReverse unix:${_NETDATA_SOCKET}|http://localhost:${_NETDATA_PORT}/ + + + + + ProxyPass http://localhost:${_NETDATA_PORT}/ connectiontimeout=5 timeout=30 keepalive=on + ProxyPassReverse http://localhost:${_NETDATA_PORT}/ + + + +RedirectMatch permanent ${_NETDATA_PREFIX} ${_NETDATA_PREFIX}/ -- cgit v1.2.3