Oxios

nginx config

Oct 4th, 2020
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.07 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.     }
  15.  
  16.     location /uploads {
  17.         autoindex off;
  18.         root /var/www/develop/backend/alexandra-portfolio-nest-api;
  19.     }
  20.  
  21.     location /swagger {
  22.         proxy_pass http://localhost:4000;
  23.         proxy_http_version 1.1;
  24.         proxy_set_header Upgrade $http_upgrade;
  25.         proxy_set_header Connection 'upgrade';
  26.         proxy_set_header Host $host;
  27.         proxy_cache_bypass $http_upgrade;
  28.     }
  29.  
  30.     location /api {
  31.         proxy_pass http://localhost:4000;
  32.         proxy_http_version 1.1;
  33.         proxy_set_header Upgrade $http_upgrade;
  34.         proxy_set_header Connection 'upgrade';
  35.         proxy_set_header Host $host;
  36.         proxy_cache_bypass $http_upgrade;
  37.     }
  38. }
Add Comment
Please, Sign In to add comment