From d1c396408f84f6095af3e743167ba9c5e9a33ea6 Mon Sep 17 00:00:00 2001 From: saul365 Date: Fri, 24 Apr 2026 16:30:44 -0600 Subject: [PATCH] Add Haproxy cheatsheet --- Haproxy-cheatsheet.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Haproxy-cheatsheet.md diff --git a/Haproxy-cheatsheet.md b/Haproxy-cheatsheet.md new file mode 100644 index 0000000..d20e73d --- /dev/null +++ b/Haproxy-cheatsheet.md @@ -0,0 +1,35 @@ + + +## Agregar un nuevo dominio + +Se debe de agregar 2 secciones de codigo bajo el bloque `frontend public` +``` +#ACL es la regla para definir comportamiento +#acl regla +acl host_test.tequi.xyz hdr_dom(host) -i test.tequi.xyz + +#use_backend define el nombre del backend dependiendo de uno o varios acl +#use_backend +use_backend test.tequi.xyz if host_test.tequi.xyz +``` + +y se debe agregar un bloque `backend` + + +``` +#backend +#- option forwardfor +#- server : +# +# +backend test.tequi.xyz + option forwardfor + server test.tequi.xyz_server localhost:8082 +``` + + +**## Borrar dominio** +Quita todas las referencias del dominio + + +Para que los cambios sean aplicados se debe de reiniciar haproxy con `systemctl restart haproxy` \ No newline at end of file