This commit is contained in:
Stanislav Hubacek
2026-04-04 23:59:18 +02:00
parent 98320fc827
commit 2c5fbf845a
7 changed files with 81 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
{
email hubacek.s@gmail.com
acme_ca https://acme-v02.api.letsencrypt.org/directory
}
(common_headers) {
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
X-XSS-Protection "1; mode=block"
}
}
(common_auth) {
basicauth {
Standa {$BASIC_AUTH_HASH}
}
}
www.hubacek.cloud {
redir https://hubacek.cloud{uri} permanent
}
import /opt/homelab/generated/caddy/*

View File

@@ -0,0 +1,6 @@
name: albrecht-podlahy
type: proxy
domain: albrecht-podlahy.hubacek.cloud
headers: true
auth: false
backend: 192.168.50.117:80

View File

@@ -0,0 +1,5 @@
name: bistrousky
type: static
domain: bistrousky.hubacek.cloud
headers: true
root: /var/www/html

View File

@@ -0,0 +1,6 @@
name: grafana
type: proxy
domain: grafana.hubacek.cloud
headers: true
auth: true
backend: 192.168.50.91:3000

View File

@@ -0,0 +1,9 @@
name: sapmini
type: proxy
domain: sapmini.hubacek.cloud
headers: true
auth: true
backend: 192.168.50.102:3001
real_ip: true
health_uri: /api/health
health_interval: 30s

View File

@@ -0,0 +1,23 @@
{{ domain }} {
{% if headers %}
import common_headers
{% endif %}
{% if auth %}
import common_auth
{% endif %}
{% if reverse_proxy_block %}
reverse_proxy {{ backend }} {
{% if real_ip %}
header_up X-Real-IP {remote_host}
{% endif %}
{% if health_uri %}
health_uri {{ health_uri }}
{% endif %}
{% if health_interval %}
health_interval {{ health_interval }}
{% endif %}
}
{% else %}
reverse_proxy {{ backend }}
{% endif %}
}

View File

@@ -0,0 +1,7 @@
{{ domain }} {
{% if headers %}
import common_headers
{% endif %}
root * {{ root }}
file_server
}