← Back to all services
Reverse Proxy Lb

HAProxy Load Balancer Port & Configuration

haproxy systemctl: haproxy

High-performance TCP/HTTP load balancer. Industry standard for high-availability.

🔌 Default Ports

80
tcp
HTTP frontend
443
tcp
HTTPS frontend
8404
tcp
Stats page (if configured)

📦 Installation Command

apt install haproxy

⚙️ Configuration Files

  • /etc/haproxy/haproxy.cfg
  • /etc/default/haproxy

📂 Default Directories

  • config: /etc/haproxy
  • data: /var/lib/haproxy
  • logs: /var/log/haproxy.log
  • socket: /var/run/haproxy/admin.sock

🔐 Default Credentials

Username:N/A
Password:N/A
💡 Stats page auth configured in haproxy.cfg: stats auth user:pass

⚠️ Conflicts

nginx (if same ports)apache2 (if same ports) Port: nginxPort: apache2Port: traefik

✅ Works With

keepalived (HA)nginx (backend)consul (service discovery)

🛡️ Security Notes

Restrict stats page access, use SSL termination with modern ciphers, enable request rate limiting, use ACLs

❓ Frequently Asked Questions

What port does HAProxy use?
HAProxy uses configurable ports - typically 80/443 for HTTP, 9000 for stats dashboard.
HAProxy vs Nginx?
HAProxy is purpose-built for load balancing. Nginx is a web server that can also load balance.
Where is HAProxy config?
Config at /etc/haproxy/haproxy.cfg.