Skip to content

Instantly share code, notes, and snippets.

@chapani
Created September 26, 2012 00:29
Show Gist options
  • Save chapani/3785284 to your computer and use it in GitHub Desktop.
Save chapani/3785284 to your computer and use it in GitHub Desktop.
global
maxconn 2048
debug
defaults
mode http
retries 3
maxconn 1024
timeout connect 5000
# timeout client 50000
# timeout server 50000
frontend unsecure *:80
redirect location https://mysite.com if !{ is_ssl }
frontend frhap
mode http
bind 0.0.0.0:443 ssl crt mysite.pem prefer-server-ciphers
acl is_www hdr_end(host) -i www.mysite.com
acl is_static path_beg /static
use_backend static if is_www is_static
redirect location https://mysite.com if is_www !is_static
default_backend cowboy
backend cowboy
mode http
balance roundrobin
cookie SERVERID insert nocache indirect
server Cowboy1 127.0.0.1:8000
backend static
balance roundrobin
cookie SERVERID insert nocache indirect
server Nginx 127.0.0.1:81
#### RIAK #####################
frontend dbcluster
mode tcp
bind 127.0.0.1:8080
default_backend riaks
backend riaks
mode tcp
balance roundrobin
server Riak1 127.0.0.1:8087 check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment