daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Feb 11th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. upstream app {
  2.   # Path to Puma SOCK file, as defined previously
  3.   server unix:/home/deploy/my-app/shared/tmp/sockets/puma.sock fail_timeout=60;
  4.   keepalive 60;
  5. }
  6.  
  7. server {
  8.         listen 80;
  9.         server_name localhost;
  10. #       websocket_pass websocket;
  11.  
  12.         root /home/deploy/my-app/current/public;
  13.  
  14.         try_files $uri/index.html $uri @app;
  15.  
  16.         location @app {
  17.           proxy_pass http://app;
  18.           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  19.           proxy_set_header Host $http_host;
  20.           proxy_redirect off;
  21.         }
  22.  
  23.         #location / {
  24.         #        proxy_set_header X-Forwarded-Proto $scheme;
  25.         #        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  26.         #        proxy_set_header X-Real-IP $remote_addr;
  27.         #        proxy_set_header Host $host;
  28.         #        proxy_redirect off;
  29.         #        proxy_http_version 1.1;
  30.         #        proxy_set_header Connection '';
  31.         #        proxy_pass http://app;
  32.         #}
  33.  
  34.         location ~ ^/(assets|fonts|system)/|favicon.ico|robots.txt {
  35.           gzip_static on;
  36.           expires max;
  37.           add_header Cache-Control public;
  38.         }
  39.  
  40.         location /cable {
  41.           proxy_pass http://app;
  42.           proxy_http_version 1.1;
  43.           proxy_set_header Upgrade $http_upgrade;
  44.           proxy_set_header Connection "Upgrade";
  45.         }
  46.  
  47.         error_page 500 502 503 504 /500.html;
  48.         client_max_body_size 4G;
  49.         keepalive_timeout 10;
  50. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top