Some updates

master
Jonas L 8 years ago committed by GitHub
parent 8acd92b84c
commit 8e323bccac
  1. 22
      documentation/PROXY.md

@ -98,21 +98,22 @@ The following configuration works for Apache (without HTTPS):
### HAProxy ### HAProxy
The following configuration works for HAProxy (HTTPS with HTTP The following configuration works for HAProxy (HTTP and HTTPS):
redirection):
```haproxy ```haproxy
frontend https
defaults
# Use HTTP protocole
mode http
frontend https
# Listen on the HTTPS and HTTP ports # Listen on the HTTPS and HTTP ports
bind :80 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) # Bind URL with the right backend
option httpclose
option forwardfor
# Bind the URL with the right backend
acl is_libresonic path_beg -i /libresonic acl is_libresonic path_beg -i /libresonic
use_backend libresonic-backend if is_libresonic use_backend libresonic-backend if is_libresonic
@ -122,6 +123,9 @@ backend libresonic-backend
# proxy_redirect directive. # proxy_redirect directive.
http-response replace-value Location ^http://(.*)$ https://\1 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 # Forward requests to Libresonic running on localhost on port 4040
server libresonic 127.0.0.1:4040 check server libresonic 127.0.0.1:4040 check
``` ```

Loading…
Cancel
Save