From 62e19a83216d6294b4c3469d3e05e7f0d00db69d Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 27 Dec 2022 14:53:15 +0300 Subject: feat(web/inbox): add landing page for inbox.tvl.su This landing page explains how to use the public-inbox. Change-Id: I37d74decad5173ab35051970593f1d28001af2b4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7645 Tested-by: BuildkiteCI Reviewed-by: flokli --- ops/modules/www/inbox.tvl.su.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'ops') diff --git a/ops/modules/www/inbox.tvl.su.nix b/ops/modules/www/inbox.tvl.su.nix index a9af18e348..38db5d2a8e 100644 --- a/ops/modules/www/inbox.tvl.su.nix +++ b/ops/modules/www/inbox.tvl.su.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, depot, ... }: { imports = [ @@ -11,10 +11,17 @@ forceSSL = true; extraConfig = '' + # nginx is incapable of serving a single file at /, hence this hack: location = / { - return 302 https://inbox.tvl.su/depot; + index /landing-page; } + location = /landing-page { + types { } default_type "text/html; charset=utf-8"; + alias ${depot.web.inbox}; + } + + # rest of requests is proxied to public-inbox-httpd location / { proxy_pass http://localhost:${toString config.services.public-inbox.http.port}; } -- cgit 1.4.1