# $OpenBSD: relayd.conf,v 1.4 2018/03/23 09:55:06 claudio Exp $
#
# Macros
#
egress="W.X.Y.Z"
lo="127.0.0.1"
#
# Global Options
#
# interval 10
# timeout 1000
# prefork 5
# log updates
#
# Each table will be mapped to a pf table.
#
table <apache2> { $lo }
table <httpd> { $lo }
http protocol https {
match request header append "X-Forwarded-For" value "$REMOTE_ADDR"
match request header append "X-Forwarded-By" \
value "$SERVER_ADDR:$SERVER_PORT"
match request header set "Connection" value "close"
match request header "Host" value "example.com" forward to <httpd>
match request header "Host" value "test.example.com" forward to <httpd>
match request header "Host" value "iso.example.com" forward to <apache2>
}
relay wwwtls {
# Run as a SSL/TLS accelerator
listen on $egress port 443 tls
protocol https
forward to <httpd> port 80 check tcp
forward to <apache2> port 81 check tcp
}