add keys file host
This commit is contained in:
@@ -53,12 +53,14 @@ in
|
||||
auto_https ignore_loaded_certs
|
||||
'';
|
||||
|
||||
# virtualHosts."key.${homelab.public_domain}" = {
|
||||
# extraConfig = ''
|
||||
# root * /var/www/keys
|
||||
# file_server
|
||||
# '';
|
||||
# };
|
||||
virtualHosts."keys.${homelab.base_domain}" = {
|
||||
serverAliases = [ "keys.${homelab.public_domain}" ];
|
||||
extraConfig = ''
|
||||
tls internal
|
||||
root /var/www/keys
|
||||
file_server browse /etc/caddy/browse.html
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# enable acme for auto ssl certs with lets encrypt
|
||||
@@ -93,6 +95,21 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."caddy/browse.html".text = ''
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{html .Name}}</title>
|
||||
<style>
|
||||
footer { display: none !important; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{{template "listing" .}}
|
||||
</body>
|
||||
</html>
|
||||
'';
|
||||
|
||||
# add to backups
|
||||
homelab.backups.baks = {
|
||||
|
||||
Reference in New Issue
Block a user