Guest User

Untitled

a guest
Dec 15th, 2020
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.23 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.     listen [::]:80;
  4.  
  5.     root /var/www/html/polania_client/dist;
  6.  
  7.     error_page 404 /index.html;
  8.  
  9.     # Add index.php to the list if you are using PHP
  10.     index index.html index.htm index.nginx-debian.html;
  11.  
  12.     server_name 159.65.115.115;
  13.  
  14.     location ^~ /assets/ {
  15.         gzip_static on;
  16.         expires 12h;
  17.         add_header Cache-Control public;
  18.   }
  19.  
  20.     location / {
  21.        
  22.         proxy_http_version 1.1;
  23.         proxy_cache_bypass $http_upgrade;
  24.  
  25.         proxy_set_header Upgrade $http_upgrade;
  26.         proxy_set_header Connection 'upgrade';
  27.         proxy_set_header Host $host;
  28.         proxy_set_header X-Real-IP $remote_addr;
  29.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  30.         proxy_set_header X-Forwarded-Proto $scheme;
  31.  
  32.     }
  33.  
  34.     location /server {
  35.                 proxy_pass http://localhost:2000;
  36.                 proxy_http_version 1.1;
  37.                 proxy_cache_bypass $http_upgrade;
  38.  
  39.                 proxy_set_header Upgrade $http_upgrade;
  40.                 proxy_set_header Connection 'upgrade';
  41.                 proxy_set_header Host $host;
  42.                 proxy_set_header X-Real-IP $remote_addr;
  43.                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  44.                 proxy_set_header X-Forwarded-Proto $scheme;
  45.         }
  46.  
  47. }
  48.  
Advertisement
Add Comment
Please, Sign In to add comment