mirror of
https://github.com/marcogll/soul23_placeholder_site_server.git
synced 2026-01-13 13:25:18 +00:00
feat: Add Caddy configuration and Docker setup for hosting the application
This commit is contained in:
41
Caddyfile
Normal file
41
Caddyfile
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user