diff options
| author | Paul Buetow <paul@buetow.org> | 2024-03-20 18:23:27 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-03-20 18:23:27 +0200 |
| commit | 51f1a20a766d7795e18259d2c03f135fb5ee4138 (patch) | |
| tree | 02b5d4d85023ddd128f1e1bcaf3f8f7ce1775769 /frontends | |
| parent | 2bc714a50bb329dbbca02db23d0b321cd42ee67a (diff) | |
add fishfinger.buetow.org and blowfish.buetow.org to httpd config for monitoring
Diffstat (limited to 'frontends')
| -rw-r--r-- | frontends/Rexfile | 8 | ||||
| -rw-r--r-- | frontends/etc/acme-client.conf.tpl | 2 | ||||
| -rw-r--r-- | frontends/etc/httpd.conf.tpl | 28 | ||||
| -rw-r--r-- | frontends/var/www/htdocs/buetow.org/self/index.txt.tpl | 1 |
4 files changed, 37 insertions, 2 deletions
diff --git a/frontends/Rexfile b/frontends/Rexfile index 1a5243d..08e730b 100644 --- a/frontends/Rexfile +++ b/frontends/Rexfile @@ -215,6 +215,14 @@ task 'httpd', group => 'frontends', mode => '644', on_change => sub { service 'httpd' => 'restart' }; + file '/var/www/htdocs/buetow.org', + ensure => 'directory'; + file '/var/www/htdocs/buetow.org/self', + ensure => 'directory'; + file '/var/www/htdocs/buetow.org/self/index.txt', + ensure => 'file', + content => template('./var/www/htdocs/buetow.org/self/index.txt.tpl'); + service 'httpd', ensure => 'started'; }; diff --git a/frontends/etc/acme-client.conf.tpl b/frontends/etc/acme-client.conf.tpl index 93f5837..8e00119 100644 --- a/frontends/etc/acme-client.conf.tpl +++ b/frontends/etc/acme-client.conf.tpl @@ -33,7 +33,7 @@ domain <%= $prefix.$host %> { <% } -%> <% } -%> -# Mail server domains +# For the server itself (e.g. TLS, or monitoring) domain <%= "$hostname.$domain" %> { domain key "/etc/ssl/private/<%= "$hostname.$domain" %>.key" domain full chain certificate "/etc/ssl/<%= "$hostname.$domain" %>.fullchain.pem" diff --git a/frontends/etc/httpd.conf.tpl b/frontends/etc/httpd.conf.tpl index afe9581..c636b80 100644 --- a/frontends/etc/httpd.conf.tpl +++ b/frontends/etc/httpd.conf.tpl @@ -26,7 +26,19 @@ server "<%= "$hostname.$domain" %>" { request strip 2 } location * { - block return 302 "https://<%= $hostname.'.'.$domain %>" + block return 302 "https://<%= "$hostname.$domain" %>" + } +} + +server "<%= "$hostname.$domain" %>" { + listen on * tls port 443 + tls { + certificate "/etc/ssl/<%= "$hostname.$domain" %>.fullchain.pem" + key "/etc/ssl/private/<%= "$hostname.$domain" %>.key" + } + location * { + root "/htdocs/buetow.org/self" + directory auto index } } @@ -113,6 +125,20 @@ server "<%= $prefix %>dory.buetow.org" { <% } -%> <% for my $prefix (@prefixes) { -%> +server "<%= $prefix %>solarcat.buetow.org" { + listen on * tls port 443 + tls { + certificate "/etc/ssl/<%= $prefix %>solarcat.buetow.org.fullchain.pem" + key "/etc/ssl/private/<%= $prefix %>solarcat.buetow.org.key" + } + location * { + root "/htdocs/joern/solarcat.buetow.org" + directory auto index + } +} +<% } -%> + +<% for my $prefix (@prefixes) { -%> server "<%= $prefix %>fotos.buetow.org" { listen on * tls port 443 tls { diff --git a/frontends/var/www/htdocs/buetow.org/self/index.txt.tpl b/frontends/var/www/htdocs/buetow.org/self/index.txt.tpl new file mode 100644 index 0000000..6b8979d --- /dev/null +++ b/frontends/var/www/htdocs/buetow.org/self/index.txt.tpl @@ -0,0 +1 @@ +Welcome to <%= $hostname.'.'.$domain %>! |
