Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 5.23 KB | None | 0 0
  1. server {
  2.     listen              443;
  3.     server_name         issa7-prerelease-ru.by.mgo.su;
  4.     limit_conn addr     10000;
  5.     ssl                 on;
  6.     ssl_certificate     server.pem;
  7.     ssl_certificate_key private.key;
  8.     ssl_session_timeout 5m;
  9.     ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
  10.     ssl_ciphers         ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS;
  11.     ssl_prefer_server_ciphers   on;
  12.     error_log           /var/log/nginx/issa7-ssl-error.log; #debug;
  13.     access_log          /var/log/nginx/issa7-ssl-access.log;
  14.     root                /var/www/pres/ru/issa7/issa7-prerelease-ru.by.mgo.su/public;
  15.  
  16.         location ~ \.php$ {
  17.                 include         /etc/nginx/fastcgi_params;
  18.                 fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
  19.                 fastcgi_param   QUERY_STRING    $query_string;
  20.                 fastcgi_pass    unix:/var/run/php-fcgi.sock;
  21.                 fastcgi_intercept_errors        on;
  22.                 break;
  23.         }
  24.  
  25.         location / {
  26.                 set $rule_1 "";
  27.                 if ( !-e $request_filename ) {
  28.                 #if ( !-d $request_filename ) {
  29.                         set $rule_1 1;
  30.                 }
  31.                 if ($rule_1 = "1"){
  32.                         rewrite "^/([^\/]+).*$" /index.php last;
  33.                 }
  34.         }
  35.  
  36.         index index.html index.htm index.php;
  37.  
  38.         location ~ ^/ics(/?)(.*)$ {
  39.                 resolver 192.168.28.11 192.168.28.21 valid=300s;
  40.                 proxy_set_header Host cabinet.ics-dct-pres-front-node1.ru.mgo.su;
  41.                 proxy_set_header X-Real-IP $remote_addr;
  42.                 proxy_set_header X-Forwarded-Host $host;
  43.                 proxy_pass https://cabinet.ics-dct-pres-front-node1.ru.mgo.su/$2$is_args$args;
  44.         }
  45.  
  46.         location ~ ^/ct(/?)(.*)$ {
  47.                 resolver 192.168.28.11 192.168.28.21 valid=300s;
  48.                 proxy_set_header Host pres-ru-dct-cabinet.ics-pres-node1.ru.mgo.su;
  49.                 proxy_set_header X-Real-IP $remote_addr;
  50.                 proxy_set_header X-Forwarded-Host $host;
  51.                 proxy_pass https://pres-ru-dct-cabinet.ics-pres-node1.ru.mgo.su/$2$is_args$args;
  52.         }
  53.  
  54.         location ~* ^.+\.(css|js)$ {
  55.                 expires 1d;
  56.                 add_header Cache-Control public;
  57.                 tcp_nodelay on;
  58.         }
  59.  
  60.         location ~* ^.+\.(jpg|gif|png)$ {
  61.                 expires 1h;
  62.                 add_header Cache-Control public;
  63.         }
  64.  
  65.         location ~* \.(eot|ttf|woff|woff2)$ {
  66.           add_header Access-Control-Allow-Origin *;
  67.         }
  68.  
  69.         location ~ /profile/ {
  70.           try_files $uri $uri/ /profile/index.php?$args;
  71.         }
  72. }
  73.  
  74. server {
  75.     listen              80;
  76.     server_name         issa7-prerelease-ru.by.mgo.su;
  77.     limit_conn addr     10000;
  78.     error_log           /var/log/nginx/issa7-http-error.log debug;
  79.     access_log          /var/log/nginx/issa7-http-access.log;
  80.     root                /var/www/pres/ru/issa7/issa7-prerelease-ru.by.mgo.su/public;
  81.  
  82.         location ~ \.php$ {
  83.                 include         /etc/nginx/fastcgi_params;
  84.                 fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
  85.                 fastcgi_param   QUERY_STRING    $query_string;
  86.                 fastcgi_pass    unix:/var/run/php-fcgi.sock;
  87.                 fastcgi_intercept_errors        on;
  88.                 break;
  89.         }
  90.  
  91.         location / {
  92.                 set $rule_1 "";
  93.                 if ( !-e $request_filename ) {
  94.                 #if ( !-d $request_filename ) {
  95.                         set $rule_1 1;
  96.                 }
  97.                 if ($rule_1 = "1"){
  98.                         rewrite "^/([^\/]+).*$" /index.php last;
  99.                 }
  100.         }
  101.  
  102.         index index.html index.htm index.php;
  103.  
  104. #        location ~ ^/ics/api/\d+/multichannel/(.*)$ {
  105.  
  106. #        }
  107.  
  108.         location ~ ^/ics(/?)(.*)$ {
  109.                 resolver 192.168.28.11 192.168.28.21 valid=300s;
  110.                 proxy_set_header Host cabinet.ics-dct-dev-front-node1.ru.mgo.su;
  111.                 proxy_set_header X-Real-IP $remote_addr;
  112.                 proxy_set_header X-Forwarded-Host $host;
  113.                 proxy_pass https://cabinet.ics-dct-pres-front-node1.ru.mgo.su/$2$is_args$args;
  114.         }
  115.  
  116.         location ~ ^/ct(/?)(.*)$ {
  117.                 resolver 192.168.28.11 192.168.28.21 valid=300s;
  118.                 proxy_set_header Host pres-ru-dct-cabinet.ics-dev-node1.ru.mgo.su;
  119.                 proxy_set_header X-Real-IP $remote_addr;
  120.                 proxy_set_header X-Forwarded-Host $host;
  121.                 proxy_pass https://pres-ru-dct-cabinet.ics-pres-node1.ru.mgo.su/$2$is_args$args;
  122.         }
  123.  
  124.         location ~* ^.+\.(css|js)$ {
  125.                 expires 1d;
  126.                 add_header Cache-Control public;
  127.                 tcp_nodelay on;
  128.         }
  129.  
  130.         location ~* ^.+\.(jpg|gif|png)$ {
  131.                 expires 1h;
  132.                 add_header Cache-Control public;
  133.         }
  134.  
  135.         location ~* \.(eot|ttf|woff|woff2)$ {
  136.            add_header Access-Control-Allow-Origin *;
  137.         }
  138.  
  139.         location ~ /profile/ {
  140.           try_files $uri $uri/ /profile/index.php?$args;
  141.         }
  142. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement