Skip to content

Instantly share code, notes, and snippets.

@programmerq
Created September 17, 2015 16:29
Show Gist options
  • Save programmerq/585a35ea95e97cc792f7 to your computer and use it in GitHub Desktop.
Save programmerq/585a35ea95e97cc792f7 to your computer and use it in GitHub Desktop.
$ docker run -d --name nginx nginx
$ docker run -p 80:80 --link nginx:backend -d --name hap -v `pwd`/hap.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro haproxy
$ curl `docker-machine ip dev`:80
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
global
log /dev/log local0
log /dev/log local1 notice
stats timeout 30s
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL).
ssl-default-bind-ciphers kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
listen http-in
bind *:80
server server1 ${BACKEND_PORT_80_TCP_ADDR}:${BACKEND_PORT_80_TCP_PORT} maxconn 32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment