Oxios

Untitled

Oct 4th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.26 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.  
  4.     server_name alexandra-portfolio.proto-dev.ru www.alexandra-portfolio.proto-dev.ru;
  5.  
  6.     location / {
  7.         root /var/www/develop/frontend/alexandra-portfolio;
  8.         try_files $uri /index.html;
  9.     }
  10.  
  11.     location /admin {
  12.         alias /var/www/develop/frontend/alexandra-portfolio-admin/build;
  13.         try_files $uri $uri/ /admin/index.html;
  14.         add_header Cache-Control public;
  15.         expires 1d;
  16.     }
  17.  
  18.     location /build {
  19.         autoindex off;
  20.         root /var/www/develop/frontend/alexandra-portfolio-admin/build;
  21.     }
  22.  
  23.     location /uploads {
  24.         autoindex off;
  25.         root /var/www/develop/backend/alexandra-portfolio-nest-api;
  26.     }
  27.  
  28.     location /swagger {
  29.         proxy_pass http://localhost:4000;
  30.         proxy_http_version 1.1;
  31.         proxy_set_header Upgrade $http_upgrade;
  32.         proxy_set_header Connection 'upgrade';
  33.         proxy_set_header Host $host;
  34.         proxy_cache_bypass $http_upgrade;
  35.     }
  36.  
  37.     location /api {
  38.         proxy_pass http://localhost:4000;
  39.         proxy_http_version 1.1;
  40.         proxy_set_header Upgrade $http_upgrade;
  41.         proxy_set_header Connection 'upgrade';
  42.         proxy_set_header Host $host;
  43.         proxy_cache_bypass $http_upgrade;
  44.     }
  45. }
Add Comment
Please, Sign In to add comment