From 8e323bccac2b10ece65def2983391b3edbf463ad Mon Sep 17 00:00:00 2001 From: Jonas L Date: Mon, 27 Feb 2017 22:32:51 +0100 Subject: [PATCH] Some updates --- documentation/PROXY.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/documentation/PROXY.md b/documentation/PROXY.md index 9c65f7cd..09ec7c6a 100644 --- a/documentation/PROXY.md +++ b/documentation/PROXY.md @@ -98,21 +98,22 @@ The following configuration works for Apache (without HTTPS): ### HAProxy -The following configuration works for HAProxy (HTTPS with HTTP -redirection): +The following configuration works for HAProxy (HTTP and HTTPS): ```haproxy -frontend https +defaults + + # Use HTTP protocole + mode http + +frontend https + # Listen on the HTTPS and HTTP ports bind :80 - bind :443 ssl crt /etc/haproxy/cert_key.pem + bind :443 ssl crt /etc/haproxy/certs/cert_key.pem - # Some useful headers (Can be placed in the "default" section) - option httpclose - option forwardfor - - # Bind the URL with the right backend + # Bind URL with the right backend acl is_libresonic path_beg -i /libresonic use_backend libresonic-backend if is_libresonic @@ -122,6 +123,9 @@ backend libresonic-backend # proxy_redirect directive. http-response replace-value Location ^http://(.*)$ https://\1 + # (OPTIONAL) Force HTTPS + redirect scheme https if !{ ssl_fc } + # Forward requests to Libresonic running on localhost on port 4040 server libresonic 127.0.0.1:4040 check ```