Advertisement
madrahimov

bantikov.conf

Nov 28th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. upstream bantikov_server {
  2. server unix:/data/bantikov/shared/unicorn.socket fail_timeout=0;
  3. }
  4. # non-www to www
  5. server {
  6. listen 80;
  7. listen 443 ssl;
  8.  
  9. ssl_certificate /data/bantikov/shared/2017_crt/bant_ssl/bundle.crt;
  10. ssl_certificate_key /data/bantikov/shared/2017_crt/bant_ssl/bantikov.key;
  11.  
  12. server_name bantikov.ru msk.bantikov.ru spb.bantikov.ru ekb.bantikov.ru chl.bantikov.ru perm.bantikov.ru krs.bantikov.ru;
  13. return 301 https://www.bantikov.ru$request_uri;
  14. }
  15.  
  16. #server {
  17. # listen 178.79.188.33:443;
  18. # server_name bantikov.ru;
  19. # ssl on;
  20. # ssl_certificate /data/bantikov/shared/crt/certificate_bundled.crt;
  21. # ssl_certificate_key /data/bantikov/shared/crt/private.key;
  22.  
  23. # #rewrite ^/(.+) http://www.bantikov.ru/$1 permanent;
  24. #}
  25.  
  26.  
  27.  
  28. server {
  29. #listen 80;
  30. listen 443 ssl;
  31.  
  32. ssl_certificate /data/bantikov/shared/2017_crt/bant_ssl/bundle.crt;
  33. ssl_certificate_key /data/bantikov/shared/2017_crt/bant_ssl/bantikov.key;
  34.  
  35. server_name 178.79.188.33 www.bantikov.ru;
  36.  
  37. client_body_buffer_size 1K;
  38. client_header_buffer_size 1k;
  39. client_max_body_size 10M;
  40. large_client_header_buffers 4 32k;
  41.  
  42. client_body_timeout 600;
  43. client_header_timeout 600;
  44. keepalive_timeout 5;
  45. send_timeout 10;
  46.  
  47.  
  48. if ($request_method !~ ^(GET|HEAD|POST)$ ) {
  49. return 444;
  50. }
  51.  
  52. location /admin {
  53. return 444;
  54. }
  55.  
  56.  
  57. root /data/bantikov/current/public;
  58. access_log /data/bantikov/shared/log/access.log;
  59. error_log /data/bantikov/shared/log/error.log;
  60.  
  61. try_files $uri/index.html $uri.html $uri @bantikov_web;
  62.  
  63. location @bantikov_web {
  64. proxy_pass http://bantikov_server;
  65. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  66. proxy_set_header Host $http_host;
  67. proxy_redirect off;
  68. proxy_read_timeout 500;
  69.  
  70. client_max_body_size 7M;
  71. root /data/bantikov/current/public;
  72.  
  73. gzip on;
  74. gzip_min_length 1024;
  75. gzip_comp_level 8;
  76. gzip_http_version 1.0;
  77. gzip_buffers 16 8k;
  78. gzip_proxied any;
  79. gzip_disable "MSIE [1-6]\.";
  80. gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript text/json;
  81. gzip_vary on;
  82. }
  83.  
  84. location ^~ /admin/ {
  85. deny all;
  86. }
  87.  
  88. location ~^/(assets)/ {
  89. root /data/bantikov/current/public;
  90. gzip_static on; # to serve pre-gzipped version
  91. expires max;
  92. add_header Last-Modified "";
  93. add_header ETag "";
  94. add_header Cache-Control public;
  95. break;
  96. }
  97.  
  98. location = /favicon.ico {
  99. log_not_found off;
  100. access_log off;
  101. }
  102.  
  103. location = /robots.txt {
  104. allow all;
  105. log_not_found off;
  106. access_log off;
  107. }
  108.  
  109. location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
  110. expires max;
  111. log_not_found off;
  112. }
  113.  
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement