✨ feat(ansible/templates): Simplifie et améliore la configuration Caddy.
This commit is contained in:
@@ -6,21 +6,23 @@ intranet.ludikevent.fr, signature.ludikevent.fr, reservation.ludikevent.fr {
|
||||
root * {{ path }}/public
|
||||
file_server
|
||||
|
||||
# --- REWRITE INVISIBLE POUR LE SITE VISITEUR ---
|
||||
@visitor_home {
|
||||
host reservation.ludikevent.fr
|
||||
path /
|
||||
# --- LOGIQUE RÉSERVATION ---
|
||||
@is_reservation_host host reservation.ludikevent.fr
|
||||
|
||||
handle @is_reservation_host {
|
||||
# Si on arrive sur la racine /
|
||||
# On réécrit en interne vers /reservation
|
||||
rewrite / /reservation
|
||||
|
||||
# On passe à PHP en s'assurant que le script index.php est utilisé
|
||||
php_fastcgi unix//run/php/php8.4-fpm.sock {
|
||||
# On force Symfony à utiliser le nouveau chemin réécrit
|
||||
env REQUEST_URI {uri}
|
||||
}
|
||||
}
|
||||
rewrite @visitor_home /reservation
|
||||
|
||||
# --- NO-INDEX ---
|
||||
@noindex_hosts host intranet.ludikevent.fr signature.ludikevent.fr
|
||||
header @noindex_hosts X-Robots-Tag "noindex, nofollow"
|
||||
|
||||
@index_host host reservation.ludikevent.fr
|
||||
header @index_host -X-Robots-Tag
|
||||
|
||||
# --- HEADERS & PHP ---
|
||||
# --- LE RESTE DES DOMAINES (Intranet / Signature) ---
|
||||
handle {
|
||||
header {
|
||||
X-Content-Type-Options "nosniff"
|
||||
X-Frame-Options "DENY"
|
||||
@@ -33,7 +35,6 @@ intranet.ludikevent.fr, signature.ludikevent.fr, reservation.ludikevent.fr {
|
||||
rewrite * /build{path}
|
||||
}
|
||||
|
||||
php_fastcgi unix//run/php/php8.4-fpm.sock {
|
||||
env REMOTE_ADDR {header.CF-Connecting-IP}
|
||||
php_fastcgi unix//run/php/php8.4-fpm.sock
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user