Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.12 KB | None | 0 0
  1. upstream app.destralegal {
  2.     server 192.168.0.101:2002;
  3. }
  4.  
  5. upstream api.destralegal {
  6.     server 192.168.0.102:5001;
  7. }
  8.  
  9. server {
  10.  
  11.     server_name destralegal.ru;
  12.  
  13.     error_page 500 501 502 504 505  /errors/500.html;
  14.     error_page 404  /errors/404.html;
  15.  
  16.     access_log /var/www/destralegal.ru/app/runtime/logs/access.nginx.log;
  17.     error_log /var/www/destralegal.ru/app/runtime/logs/error.nginx.log;
  18.  
  19.     client_max_body_size 100M;
  20.     client_body_buffer_size 50M;
  21.  
  22.     location / {
  23.       proxy_redirect off;
  24.       proxy_buffering off;
  25.       proxy_pass http://app.destralegal;
  26.       proxy_http_version 1.1;
  27.       proxy_set_header Upgrade $http_upgrade;
  28.       proxy_set_header Connection 'upgrade';
  29.       proxy_set_header Host $host;
  30.       proxy_cache_bypass $http_upgrade;
  31.     }
  32.  
  33.     location /api/v1 {
  34.       proxy_redirect off;
  35.       proxy_buffering off;
  36.       proxy_pass http://api.destralegal;
  37.       proxy_http_version 1.1;
  38.       proxy_set_header Upgrade $http_upgrade;
  39.       proxy_set_header Connection 'upgrade';
  40.       proxy_set_header Host $host;
  41.       proxy_cache_bypass $http_upgrade;
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement