michaelpastes

Untitled

Jul 26th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. upstream unicorn {
  2. server unix:/tmp/unicorn.remotepg.sock fail_timeout=0;
  3. }
  4.  
  5. server {
  6. listen 80 default deferred;
  7. # server_name example.com;
  8. root /home/michael/apps/remotepg/current/public;
  9.  
  10. location ^~ /assets/ {
  11. gzip_static on;
  12. expires max;
  13. add_header Cache-Control public;
  14. }
  15.  
  16. try_files $uri/index.html $uri @unicorn;
  17. location @unicorn {
  18. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  19. proxy_set_header Host $http_host;
  20. proxy_redirect off;
  21. proxy_pass http://unicorn;
  22. auth_basic "Restricted";
  23. auth_basic_user_file /home/michael/apps/remotepg/current/public/.htpasswd;
  24. }
  25.  
  26. error_page 500 502 503 504 /500.html;
  27. client_max_body_size 4G;
  28. keepalive_timeout 10;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment