Version Check
haproxy -v
Important Files and Directories
- Config file:
/etc/haproxy/haproxy.cfg - Binary:
/usr/sbin/haproxy
Service Management
Start HAProxy:
systemctl start haproxy
Restart after config changes:
systemctl restart haproxy
Check status:
systemctl status haproxy
View live logs:
journalctl -u haproxy -f
Configuration
Edit config:
vim /etc/haproxy/haproxy.cfg
Validate config:
haproxy -c -f /etc/haproxy/haproxy.cfg
Restart after changes:
systemctl restart haproxy
Notes
- HAProxy is installed but NOT automatically configured
- Ensure
/etc/haproxy/haproxy.cfgis properly set before use - Restart is required after every change
- Service will not function correctly with default empty config