Skip to content

Instantly share code, notes, and snippets.

@amccloud
Created July 15, 2013 01:14
Show Gist options
  • Save amccloud/5996874 to your computer and use it in GitHub Desktop.
Save amccloud/5996874 to your computer and use it in GitHub Desktop.
defaults
mode http
timeout client 15s
timeout server 15s
timeout connect 5s
frontend http
bind *:80
bind *:443 ssl crt /path/to/ssl.pem
option forwardfor
reqadd X-Forwarded-Proto:\ https if { ssl_fc }
acl is_erchef hdr_cnt(x-ops-userid) eq 1
acl is_erchef path_reg ^/_status/?
acl is_bookshelf path_reg ^/bookshelf/{0,1}.*$
redirect scheme https if !{ ssl_fc }
use_backend bookshelf if is_bookshelf
use_backend erchef if is_erchef
default_backend chef_server_webui
backend chef_server_webui
server chef_server_webui_01 127.0.0.1:9462
backend erchef
server erchef_01 127.0.0.1:8000
backend bookshelf
server bookshelf_01 127.0.0.1:4321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment