Skip to content

Instantly share code, notes, and snippets.

@flores
Created October 18, 2010 20:30
Show Gist options
  • Save flores/632993 to your computer and use it in GitHub Desktop.
Save flores/632993 to your computer and use it in GitHub Desktop.
frontend http
bind :80
mode http
option http-server-close
retries 3
option redispatch
maxconn 5000
# 120,000 ms is 2 minutes
contimeout 120000
clitimeout 120000
srvtimeout 120000
# favicons for either www.mysite.com or app.mysite.com may as well go to the static cluster
acl ico url_reg favicon.ico
# all our perl cgis end with pl or cgi
acl perlcgi url_reg \.pl$|\.cgi$
# all our sinatra ruby apps look for the header app.mysite.com
acl rubyapp hdr(host) app.mysite.com
# and now that we've created those acls, let's go to our targets
use_backend static if ico
use_backend apache if perlcgi
use_backend sinatra if rubyapp
# if nothing matches, we're going to the static cluster
default_backend static
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment