Skip to content

Instantly share code, notes, and snippets.

@mcansky
Created July 19, 2014 09:52
Show Gist options
  • Save mcansky/4e81bf6896f4954a2185 to your computer and use it in GitHub Desktop.
Save mcansky/4e81bf6896f4954a2185 to your computer and use it in GitHub Desktop.
Hipache config
{
"server": {
"accessLog": "/var/log/hipache/access.log",
"pidFile": "/var/run/hipache.pid",
"workers": 5,
"maxSockets": 100,
"deadBackendTTL": 90,
"port": 80,
"bind": ["0.0.0.0"],
"https": {
"port": 443,
"bind": ["0.0.0.0"],
"key": "/etc/ssl/private/ssl.key",
"cert": "/etc/ssl/certs/ssl.crt"
}
},
"driver": "redis://<redis_host>:6379/0"
}
#
http {
server {
# https config, serving the connections to a unicorn on socket (ssl stops at hipache)
}
# http config, redirects to https (force ssl)
server {
listen 80;
client_max_body_size 4G;
return 301 https://$host$request_uri;
}
}
redis <redis_host>:6379> lrange frontend:www.example.com 0 -1
1) "website"
2) "http://<private_ip1>:80"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment