wiki:proxy:haproxy:installation_config
This is an old revision of the document!
Table of Contents
Installation et configuration de base de HAProxy pour un reverse proxy simple
Installation (Debian12)
Simple package à installer sur le serveur.
sudo apt install haproxy
Configuration de base
La configuration de HAProxy se fait via le fichier de configuration haproxy.cfg situé à /etc/haproxy/haproxy.cfg
vim /etc/haproxy/haproxy.cfg
Le frontend
On rajoute un front end en mode http (ici tout les entrées sur le port 80)
frontend http-in bind *:80 mode http
Le backend
Test de la configuration
Tester la configuration avant de relancer haproxy pour eviter les erreurs.
haproxy -c -f /etc/haproxy/haproxy.cfg
Si tout est bon, relancer le service.
sudo systemctl restart haproxy
wiki/proxy/haproxy/installation_config.1741439057.txt.gz · Last modified: 2025/03/08 14:04 by hmattaliano