From 767c32b539a91c93de475355a8ee4b8804242df0 Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Wed, 3 May 2017 22:39:33 +0200 Subject: [PATCH] HAProxy reverse proxy documentation --- docs/first_steps.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/first_steps.md b/docs/first_steps.md index f94718cdb..b75075959 100644 --- a/docs/first_steps.md +++ b/docs/first_steps.md @@ -145,6 +145,19 @@ server { } ``` +### HAProxy +``` +frontend https-in + bind :::443 v4v6 ssl crt mailcow.pem + default_backend mailcow + +backend mailcow + option forwardfor + http-request set-header X-Forwarded-Proto https if { ssl_fc } + http-request set-header X-Forwarded-Proto http if !{ ssl_fc } + server mailcow 127.0.0.1:8080 check +``` + ## Optional: Setup a relayhost Insert these lines to `data/conf/postfix/main.cf`. "relayhost" does already exist (empty), just change its value.