Advertisement
abhishek77in

nginx-conf

Oct 13th, 2013
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. upstream unicorn {
  2. server unix:/tmp/unicorn.projectname.sock fail_timeout=0;
  3. }
  4.  
  5. server {
  6. listen 80 default deferred;
  7. # server_name example.com;
  8. root /home/username/apps/projectname/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. }
  23.  
  24. error_page 500 502 503 504 /500.html;
  25. client_max_body_size 4G;
  26. keepalive_timeout 10;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement