haproxy – Reverse proxy ssl pass-through (OSI 4) – OpenWRT

Useful haproxy.cfg file for your reverse proxy needs with some added security. In frontend stats you need to change the default username:password to securely access (locally) the statistics webui at port 9000 or any other port you choose. This configuration is great if you have multiple domains behind a router and was built for openwrt so you might need to teak some parameters to fit your OS requirements. All http requests are being forwarded to https for inspection and then forwarded again to the appropriate backend server all though OSI 4 transport layer packet inspection. All ssl certificates are being managed for the backend servers.

Check your configuration with:

haproxy -c -f /etc/haproxy.cfg

If all goes well type:

/etc/init.d/haproxy restart

/etc/haproxy.cfg: