wiki:proxy:haproxy:installation_config
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:proxy:haproxy:installation_config [2025/03/08 14:10] – [Le frontend] hmattaliano | wiki:proxy:haproxy:installation_config [2025/03/08 16:20] (current) – hmattaliano | ||
---|---|---|---|
Line 31: | Line 31: | ||
use_backend load1 if myapp_front1 | use_backend load1 if myapp_front1 | ||
- | acl myapp_front2 hdr_dom(host) -i sous-domaine1.mon-domaine.fr | + | acl myapp_front2 hdr_dom(host) -i sous-domaine2.mon-domaine.fr |
use_backend load2 if myapp_front2 | use_backend load2 if myapp_front2 | ||
- | |||
</ | </ | ||
+ | (ici tout les entrées sur le port 80) | ||
+ | On utilise se qu'on appel une ACL pour faire une sorte de règle de redirection. | ||
+ | |||
+ | - **myapp_frontX** est un nom d'ACL | ||
+ | - **hdr_dom(host)** récupère la requête du frontend | ||
+ | - **-i sous-domaineX.mon-domaine.fr** est identique à ce DNS | ||
+ | - **use_backend loadX if myapp_frontX** Utilise le backend désigné " | ||
==== Le backend ==== | ==== Le backend ==== | ||
- | acl myapp_front1 hdr_dom(host) -i test1.hugo-mattaliano.fr | + | Désignation des serveurs qui seront utilisés par les règles ACL |
- | use_backend load1 if myapp_front1 | + | |
- | + | ||
- | acl myapp_front2 hdr_dom(host) -i test2.hugo-mattaliano.fr | + | |
- | use_backend load2 if myapp_front2 | + | |
+ | < | ||
backend load1 | backend load1 | ||
server serveur_apache 172.16.0.101: | server serveur_apache 172.16.0.101: | ||
- | |||
backend load2 | backend load2 | ||
server serveur_nginx 172.16.0.102: | server serveur_nginx 172.16.0.102: | ||
+ | </ | ||
==== Test de la configuration ==== | ==== Test de la configuration ==== | ||
wiki/proxy/haproxy/installation_config.1741439400.txt.gz · Last modified: 2025/03/08 14:10 by hmattaliano