Skip to content

Instantly share code, notes, and snippets.

@wicz
Last active April 25, 2017 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wicz/6ada79d200572583cf2f586e26253475 to your computer and use it in GitHub Desktop.
Save wicz/6ada79d200572583cf2f586e26253475 to your computer and use it in GitHub Desktop.
global
daemon
maxconn 32
tune.ssl.default-dh-param 2048
defaults
mode http
option forwardfor
option http-server-close
timeout connect 2s
timeout client 5s
timeout server 5s
frontend http-in
bind *:80
bind *:443 ssl crt /usr/local/etc/ssl/snake-oil.pem ciphers AES128+EECDH:AES128+EDH force-tlsv12 no-sslv3
mode http
acl out-1 hdr_end(host) -i api.dev
use_backend http-out-1 if out-1
default_backend http-out
backend http-out
mode http
server app 127.0.0.1:3000
http-response set-header Access-Control-Allow-Origin "*"
backend http-out-1
mode http
server app 127.0.0.1:3001
http-response set-header Access-Control-Allow-Origin "*"
<!-- /usr/local/opt/haproxy/homebrew.mxcl.haproxy.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.haproxy</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/haproxy</string>
<string>-f</string>
<string>/usr/local/etc/haproxy.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment