Skip to content

Instantly share code, notes, and snippets.

@seekshiva
Created December 27, 2012 07:27
Show Gist options
  • Select an option

  • Save seekshiva/4386309 to your computer and use it in GitHub Desktop.

Select an option

Save seekshiva/4386309 to your computer and use it in GitHub Desktop.

Revisions

  1. seekshiva created this gist Dec 27, 2012.
    20 changes: 20 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    upstream thin {
    server unix:/tmp/thin.0.sock;
    server unix:/tmp/thin.1.sock;
    server unix:/tmp/thin.2.sock;
    }

    server {
    listen 80;

    location /status.html {
    proxy_pass http://thin;
    }

    if ($http_x_forwarded_proto = 'http') {
    rewrite ^/(.*)$ https://$server_name$request_uri? permanent;
    }

    location / {
    proxy_pass http://thin;
    }