haproxy default page

This commit is contained in:
goeranh 2026-02-28 01:04:24 +01:00
parent 2afb0b0aae
commit 069759f8d9
No known key found for this signature in database

View file

@ -105,23 +105,25 @@
name = "index.html";
text = ''
<html>
<head>
<title>
StuRa HTWD Index
</title>
</head>
<body>
<ul>
${lib.foldlAttrs (
prev: name: value:
prev
+ ''
<li><a href="https://${value.domain}">${name}</a></li>
''
) "" forwards}
</ul>
</body>
<head>
<title>
StuRa HTWD Index
</title>
</head>
<body>
<p>
Du hast dich scheinbar verlaufen. Können wir dir hier möglicherweise weiter helfen?
</p>
<ul>
${lib.foldlAttrs (
prev: name: value:
prev
+ ''
<li><a href="https://${value.domain}">${name}</a></li>
''
) "" forwards}
</ul>
</body>
</html>
'';
};
@ -190,11 +192,13 @@
${lib.foldlAttrs (
prev: name: value:
prev + "use_backend ${name}_80 if is_${name}\n"
prev + ''
use_backend ${name}_80 if is_${name}
http-request redirect scheme https code 301 if !is_acme is_${name}
''
) "" forwards}
http-request redirect scheme https code 301 if !is_acme
default_backend default_backend
frontend ssh_jump_alt
bind *:2142
@ -216,6 +220,10 @@
prev + "use_backend ${name}_443 if { req_ssl_sni -i ${value.domain} }\n"
) "" forwards}
backend default_backend
mode http
http-request return status 200 content-type "text/html" file ${indexPage}
backend ssh_srs2
mode tcp
timeout server 30m