Browse Source

add an relay example

ok pyr@
OPENBSD_4_1
reyk 18 years ago
parent
commit
14d12619ff
2 changed files with 54 additions and 2 deletions
  1. +27
    -1
      src/etc/hoststated.conf
  2. +27
    -1
      src/etc/relayd.conf

+ 27
- 1
src/etc/hoststated.conf View File

@ -1,4 +1,4 @@
# $OpenBSD: hoststated.conf,v 1.3 2007/02/26 13:04:34 pyr Exp $
# $OpenBSD: hoststated.conf,v 1.4 2007/02/26 13:58:31 reyk Exp $
# #
# Macros # Macros
# #
@ -10,6 +10,7 @@ webhost2="10.0.0.2"
# #
# interval 10 # interval 10
# timeout 200 # timeout 200
# prefork 5
# #
# Each table will be mapped to a pf table. # Each table will be mapped to a pf table.
@ -39,3 +40,28 @@ service www {
table webhosts table webhosts
backup table fallback backup table fallback
} }
#
# Relays and protocols are used for Layer 7 loadbalancing
#
protocol httpssl {
protocol http
append "$REMOTE_ADDR" to "X-Forwarded-For"
append "$SERVER_ADDR:$SERVER_PORT" to "X-Forwarded-By"
change "Connection" to "close"
# Various TCP performance options
tcp { nodelay, sack, socket buffer 65536, backlog 128 }
# ssl { no sslv2, sslv3, tlsv1, ciphers HIGH }
# ssl session cache disable
}
relay wwwssl {
# Run as a SSL accelerator
listen on 192.168.1.1 port 443 ssl
protocol httpssl
# Forward to hosts in the webhosts table using a src/dst hash
table webhosts loadbalance
}

+ 27
- 1
src/etc/relayd.conf View File

@ -1,4 +1,4 @@
# $OpenBSD: relayd.conf,v 1.3 2007/02/26 13:04:34 pyr Exp $
# $OpenBSD: relayd.conf,v 1.4 2007/02/26 13:58:31 reyk Exp $
# #
# Macros # Macros
# #
@ -10,6 +10,7 @@ webhost2="10.0.0.2"
# #
# interval 10 # interval 10
# timeout 200 # timeout 200
# prefork 5
# #
# Each table will be mapped to a pf table. # Each table will be mapped to a pf table.
@ -39,3 +40,28 @@ service www {
table webhosts table webhosts
backup table fallback backup table fallback
} }
#
# Relays and protocols are used for Layer 7 loadbalancing
#
protocol httpssl {
protocol http
append "$REMOTE_ADDR" to "X-Forwarded-For"
append "$SERVER_ADDR:$SERVER_PORT" to "X-Forwarded-By"
change "Connection" to "close"
# Various TCP performance options
tcp { nodelay, sack, socket buffer 65536, backlog 128 }
# ssl { no sslv2, sslv3, tlsv1, ciphers HIGH }
# ssl session cache disable
}
relay wwwssl {
# Run as a SSL accelerator
listen on 192.168.1.1 port 443 ssl
protocol httpssl
# Forward to hosts in the webhosts table using a src/dst hash
table webhosts loadbalance
}

Loading…
Cancel
Save