Skip to content

Instantly share code, notes, and snippets.

@boopathi
Forked from seekshiva/gist:4386309
Last active December 10, 2015 05:18

Revisions

  1. boopathi revised this gist Dec 27, 2012. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -12,14 +12,14 @@
    location /status.html {
    proxy_pass http://thin;
    }
    location / {
    proxy_pass http://thin;
    }

    if ($http_x_forwarded_proto = 'http') {
    #return 301 https://$server_name$request_uri;
    # (or)
    rewrite ^ https://$server_name$request_uri? permanent;
    }

    location / {
    proxy_pass http://thin;
    }
    }
  2. boopathi revised this gist Dec 27, 2012. 1 changed file with 21 additions and 16 deletions.
    37 changes: 21 additions & 16 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,20 +1,25 @@
    upstream thin {
    server unix:/tmp/thin.0.sock;
    server unix:/tmp/thin.1.sock;
    server unix:/tmp/thin.2.sock;
    }
    upstream thin {
    server unix:/tmp/thin.0.sock;
    server unix:/tmp/thin.1.sock;
    server unix:/tmp/thin.2.sock;
    }

    server {
    listen 80;
    server {
    listen 80;

    location /status.html {
    proxy_pass http://thin;
    }
    server_name my-domain-name.com

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

    location / {
    proxy_pass http://thin;
    }
    if ($http_x_forwarded_proto = 'http') {
    #return 301 https://$server_name$request_uri;
    # (or)
    rewrite ^ https://$server_name$request_uri? permanent;
    }

    location / {
    proxy_pass http://thin;
    }
    }
  3. @seekshiva 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;
    }