feat: Add Caddy configuration and Docker setup for hosting the application

This commit is contained in:
Marco Gallegos
2025-11-24 20:05:26 -06:00
parent 3a4726305d
commit 227f887c78
3 changed files with 262 additions and 0 deletions

41
Caddyfile Normal file
View File

@@ -0,0 +1,41 @@
# Configuración básica de Caddy para solu23.cloud
solu23.cloud {
# Raíz del sitio
root * /var/www/sol23_placeholder
# Habilitar compresión
encode gzip
# Servir archivos estáticos
file_server
# Página de error personalizada (opcional)
handle_errors {
respond "{http.error.status_code} {http.error.status_text}"
}
# Headers de seguridad
header {
# Habilitar HSTS
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
# Prevenir clickjacking
X-Frame-Options "SAMEORIGIN"
# Prevenir MIME sniffing
X-Content-Type-Options "nosniff"
# XSS Protection
X-XSS-Protection "1; mode=block"
# Referrer Policy
Referrer-Policy "strict-origin-when-cross-origin"
}
# Logs (opcional)
log {
output file /var/log/caddy/solu23.log
format json
}
}
# Redirección de www a no-www (opcional)
www.solu23.cloud {
redir https://solu23.cloud{uri} permanent
}