From f27c8ef462eb4fd884bf0219d33815baba27fb6c Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 3 Apr 2018 22:25:49 +0200 Subject: [PATCH] =?UTF-8?q?R=C3=A8glages=20backends=20HAProxy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services.nix | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/services.nix b/services.nix index a14e19b..5608e8c 100644 --- a/services.nix +++ b/services.nix @@ -16,14 +16,20 @@ mode http bind :80 acl letsencrypt-acl path_beg /.well-known/acme-challenge/ + acl grafana-acl hdr(host) -i grafana.tars.nyanlout.re + acl emby-acl hdr(host) -i emby.tars.nyanlout.re use_backend letsencrypt-backend if letsencrypt-acl - use_backend grafana-backend if !letsencrypt-acl - backend grafana-backend - mode http - server grafana 127.0.0.1:3000 check + use_backend grafana-backend if grafana-acl + use_backend emby-backend if emby-acl backend letsencrypt-backend mode http server letsencrypt 127.0.0.1:54321 + backend grafana-backend + mode http + server grafana 127.0.0.1:3000 check + backend emby-backend + mode http + server emby 127.0.0.1:8096 check ''; services.nginx.enable = true; @@ -34,13 +40,14 @@ }; }; - security.acme.certs = { - "tars.nyanlout.re" = { - user = "nginx"; - webroot = "/var/www/challenges"; - email = "paul@nyanlout.re"; - }; - }; +# security.acme.certs = { +# "grafana.tars.nyanlout.re" = { +# user = "nginx"; +# webroot = "/var/www/challenges"; +# email = "paul@nyanlout.re"; +# }; +# }; +# security.acme.directory = "/var/lib/acme"; services.influxdb.enable = true; services.influxdb.dataDir = "/var/db/influxdb"; @@ -63,7 +70,7 @@ }; services.grafana.enable = true; - services.grafana.addr = "0.0.0.0"; + services.grafana.addr = "127.0.0.1"; services.grafana.dataDir = "/var/lib/grafana"; services.emby.enable = true;