Advertisement
Guest User

Untitled

a guest
Jul 16th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.68 KB | None | 0 0
  1. server {
  2.   listen 80;
  3.   listen 443 ssl http2;
  4.   server_name test1.hotelinstinct.com;
  5.   ssl_certificate /etc/letsencrypt/live/wildcard.hotelinstinct.com/fullchain.pem;
  6.   ssl_certificate_key /etc/letsencrypt/live/wildcard.hotelinstinct.com/privkey.pem;
  7.   if ($scheme = http) {
  8.     return 301 https://test1.hotelinstinct.com$request_uri;
  9.   }
  10.  
  11.   gzip on;
  12.   gzip_http_version 1.1;
  13.   gzip_comp_level 5;
  14.   gzip_proxied any;
  15.   gzip_min_length 100;
  16.   gzip_buffers 16 8k;
  17.   gzip_types text/plain text/css application/javascript application/json text/xml application/xml application/xml+rss t$
  18.   gzip_disable "msie6";
  19.   gzip_vary on;
  20.  
  21.   location / {
  22.     proxy_set_header X-Real-IP $remote_addr;
  23.     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  24.     proxy_set_header X-Forwarded-Proto $scheme;
  25.     proxy_set_header Host $http_host;
  26.     proxy_set_header X-NginX-Proxy true;
  27.  
  28.     proxy_pass http://localhost:4701/;
  29.     proxy_redirect off;
  30.  
  31.     proxy_http_version 1.1;
  32.     proxy_set_header Upgrade $http_upgrade;
  33.     proxy_set_header Connection "upgrade";
  34.  
  35.     proxy_set_header Host $host;
  36.   }
  37. }
  38.  
  39. server {
  40.   listen 80;
  41.   listen 443 ssl http2;
  42.   server_name test2.hotelinstinct.com;
  43.   ssl_certificate /etc/letsencrypt/live/wildcard.hotelinstinct.com/fullchain.pem;
  44.   ssl_certificate_key /etc/letsencrypt/live/wildcard.hotelinstinct.com/privkey.pem;
  45.   if ($scheme = http) {
  46.     return 301 https://test2.hotelinstinct.com$request_uri;
  47.   }
  48.  
  49.   gzip on;
  50.   gzip_http_version 1.1;
  51.   gzip_comp_level 5;
  52.   gzip_proxied any;
  53.   gzip_min_length 100;
  54.   gzip_buffers 16 8k;
  55.   gzip_types text/plain text/css application/javascript application/json text/xml application/xml application/xml+rss t$
  56.   gzip_disable "msie6";
  57.   gzip_vary on;
  58.  
  59.   location / {
  60.     proxy_set_header X-Real-IP $remote_addr;
  61.     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  62.     proxy_set_header X-Forwarded-Proto $scheme;
  63.   }
  64.  
  65.   gzip on;
  66.   gzip_http_version 1.1;
  67.   gzip_comp_level 5;
  68.   gzip_proxied any;
  69.   gzip_min_length 100;
  70.   gzip_buffers 16 8k;
  71.   gzip_types text/plain text/css application/javascript application/json text/xml application/xml application/xml+rss t$
  72.   gzip_disable "msie6";
  73.   gzip_vary on;
  74.  
  75.   location / {
  76.     proxy_set_header X-Real-IP $remote_addr;
  77.     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  78.     proxy_set_header X-Forwarded-Proto $scheme;
  79.     proxy_set_header Host $http_host;
  80.     proxy_set_header X-NginX-Proxy true;
  81.  
  82.     proxy_pass http://localhost:4700/;
  83.     proxy_redirect off;
  84.  
  85.     proxy_http_version 1.1;
  86.     proxy_set_header Upgrade $http_upgrade;
  87.     proxy_set_header Connection "upgrade";
  88.  
  89.     proxy_set_header Host $host;
  90.   }
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement