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 ```