Loading....
Receive traffic on port 80 and forward it to the backend server with the host header set to abc.xyz
# Global settings
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
# See: https://ssl-config.mozilla.org/#server=haproxy&version=2.0.0
ssl-default-bind-options no-sslv3
ssl-default-bind-ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256
# Default settings
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
# Frontend definition
frontend http-in
bind *:80
acl host_abc_com hdr(host) -i abc.xyz
use_backend backend_abc if host_abc_com
# Backend definition for abc.com
backend backend_abc
server server1 127.0.0.1:81
# Default backend for other requests
backend backend_default
server default_server 127.0.0.1:81