Browse Source

Ajout de commentaire pour le reverse proxy haproxy

pull/4/head
LecygneNoir 4 years ago
parent
commit
7308b5e0d2
2 changed files with 28 additions and 0 deletions
  1. +6
    -0
      content/comments/configurer-reverse-proxy-haproxy/15.md
  2. +22
    -0
      content/comments/configurer-reverse-proxy-haproxy/16.md

+ 6
- 0
content/comments/configurer-reverse-proxy-haproxy/15.md View File

@ -0,0 +1,6 @@
email:
date: 2019-10-01T16:56+02:00
author:
replyto: 13md
Ca serait parfait, mais comme c'est un shared je suis obligé de lui coller www.domain.tld/xxx/*, pense tu que c’est jouable ainsi : acl stay_http path_beg www.domain.tld/xxx/ ?

+ 22
- 0
content/comments/configurer-reverse-proxy-haproxy/16.md View File

@ -0,0 +1,22 @@
email: courriel+blog@victor-hery.com
date: 2019-10-01T19:32+01:00
author: Victor
website: https://blog.victor-hery.com/
replyto: 13md
Mmmh, pour faire ça je jouerai plutôt sur la possibilité de faire des "and" avec `use_backend`, parce que le `path_beg` traite vraiment ce qui est "path" dans la requête et pas l'host
Je ferai 2 acl avec un and de cette manière :
```
acl stay_http path_beg /xxx/
acl domain hdr(host) www.domain.tld
use_backend mon_backend_http if stay_http domain
```
Sur haproxy, un espace est un "and", pour un "or" il faut spécifier "or", du coup là on dit "utilise le backend `mon_backend_http` si l'acl `stay_http` est vraie ET si l'acl `domain` est vraie"
A tester, je suis pas sûr à 200% de ma syntaxe (surtout si tu utilises haproxy 2)
Bon courage !

Loading…
Cancel
Save