Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packaging/aleph-vm/etc/haproxy/haproxy-aleph.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@


global
log /dev/log local0
log /dev/log local1 notice
log stdout format raw local0
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
Expand Down Expand Up @@ -48,7 +47,8 @@ frontend stats

# Frontend for HTTPS traffic (with SNI extraction)
frontend ft_ssl
bind *:443
bind :::443 v4v6

mode tcp

# Inspect SSL handshake
Expand All @@ -65,7 +65,7 @@ frontend ft_ssl

# Frontend for HTTP traffic (with Host header extraction)
frontend ft_http
bind *:80
bind :::80 v4v6
mode http

# Extract Host header and store it
Expand All @@ -77,7 +77,7 @@ frontend ft_http

# Frontend for SSH and other TCP traffic
frontend ft_ssh
bind *:2222
bind :::2222 v4v6
#ssl crt /etc/haproxy/certs/ssl.pem
mode tcp

Expand Down Expand Up @@ -106,8 +106,8 @@ backend bk_http
mode http
# Use the appropriate variable based on the traffic type
# For HTTP - Use Host header
use-server %[var(txn.host),lower,map(/etc/haproxy/http_domains.map)] if { var(txn.host) -m found }
http-request set-header Host %[req.hdr(host)]
use-server %[var(txn.host),lower,map(/etc/haproxy/http_domains.map)] if { var(txn.host) -m found }
server web1 127.0.0.1:4020

# Default to fallback to the aleph-vm supervisor
Expand Down
Loading