Advertisement
Guest User

my_app

a guest
Oct 26th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. upstream puma_whatsupdoc_production {
  2. server unix:/home/deployer/apps/whatsupdoc/shared/tmp/sockets/puma.sock fail_timeout=0;
  3. }
  4.  
  5. server {
  6.  
  7. listen 80;
  8.  
  9. client_max_body_size 4G;
  10. keepalive_timeout 10;
  11.  
  12. error_page 500 502 504 /500.html;
  13. error_page 503 @503;
  14.  
  15. server_name apakabardoc.com;
  16. root /home/deployer/apps/whatsupdoc/current/public;
  17. try_files $uri/index.html $uri @puma_whatsupdoc_production;
  18.  
  19. location @puma_whatsupdoc_production {
  20. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  21. proxy_set_header Host $http_host;
  22. proxy_redirect off;
  23.  
  24. proxy_pass http://puma_whatsupdoc_production;
  25. # limit_req zone=one;
  26. access_log /home/deployer/apps/whatsupdoc/shared/log/nginx.access.log;
  27. error_log /home/deployer/apps/whatsupdoc/shared/log/nginx.error.log;
  28. }
  29.  
  30. location ^~ /assets/ {
  31. gzip_static on;
  32. expires max;
  33. add_header Cache-Control public;
  34. }
  35.  
  36. location = /50x.html {
  37. root html;
  38. }
  39.  
  40. location = /404.html {
  41. root html;
  42. }
  43.  
  44. location @503 {
  45. error_page 405 = /system/maintenance.html;
  46. if (-f $document_root/system/maintenance.html) {
  47. rewrite ^(.*)$ /system/maintenance.html break;
  48. }
  49. rewrite ^(.*)$ /503.html break;
  50. }
  51.  
  52. if ($request_method !~ ^(GET|HEAD|PUT|PATCH|POST|DELETE|OPTIONS)$ ){
  53. return 405;
  54. }
  55.  
  56. if (-f $document_root/system/maintenance.html) {
  57. return 503;
  58. }
  59.  
  60. location ~ \.(php|html)$ {
  61. return 405;
  62. }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement