Skip to content

Instantly share code, notes, and snippets.

@fabware
Forked from saimonmoore/gist:974229
Created June 8, 2011 01:38

Revisions

  1. @saimonmoore saimonmoore created this gist May 16, 2011.
    22 changes: 22 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    Setup
    =====

    [stunnel acccept port 443 connect 8443]
    ||
    [haproxy
    * accept port 80
    default: connect 8080 (nginx)
    host: 'push.*' => connect 8090 (node)
    * accept port 8443
    default: x-forwarded-proto: 'https' => connect 8444 (nginx)
    host: 'push.*' + x-forwarded-proto: 'https' => connect 8090 (node)]
    || ||
    [node accept port 8090] [nginx accept port 8080 && 8444]

    Configs
    =======

    stunnel: https://github.com/nedap/stunnel
    stunnel conf: https://gist.github.com/cc076e8d6e85ef1e0827

    haproxy conf: https://gist.github.com/a3a73f3f22e978b930dc