From ffa42deab1068d341d091274892b242b14932c2a Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 23 Aug 2020 07:15:11 -0300 Subject: Serve favicon from repo in cgit --- vps-configuration.env.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'vps-configuration.env.nix') diff --git a/vps-configuration.env.nix b/vps-configuration.env.nix index 56f2c56..3f99e1a 100644 --- a/vps-configuration.env.nix +++ b/vps-configuration.env.nix @@ -108,9 +108,14 @@ in { "${envsubstConfiguration.gitTLD}" = { forceSSL = true; enableACME = true; - locations."/" = { - proxyPass = "http://localhost:${envsubstConfiguration.gitPort}"; - }; + extraConfig = '' + location = /favicon.ico { + alias ${envsubstConfiguration.dataRoot}/favicons/git.ico; + } + location / { + proxy_pass http://localhost:${envsubstConfiguration.gitPort}; + } + ''; }; "${envsubstConfiguration.bonecoTLD}" = { forceSSL = true; @@ -125,11 +130,11 @@ in { "${envsubstConfiguration.songbooksDocumentationTLD}" = { forceSSL = true; enableACME = true; - root = "${envsubstConfiguration.staticRoot}/songbooks/"; extraConfig = '' location = / { return 301 master/; } + root = ${envsubstConfiguration.staticRoot}/songbooks/; ''; }; "${envsubstConfiguration.prosodyTLD}" = { -- cgit v1.3