Advertisement
Mochinov

Untitled

Oct 14th, 2022
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. upstream school {
  2. server web:8000;
  3. }
  4.  
  5. server {
  6. listen 80;
  7.  
  8. location / {
  9. root /app/dist;
  10. #index index.html index.htm;
  11. try_files $uri $uri/ /index.html;
  12. }
  13.  
  14. location /api/ {
  15. proxy_pass http://school;
  16. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  17. proxy_set_header Host $host;
  18. proxy_redirect off;
  19. }
  20.  
  21. location /ws/ {
  22. proxy_pass http://0.0.0.0:8001;;
  23. proxy_http_version 1.1;
  24. proxy_set_header Upgrade $http_upgrade;
  25. proxy_set_header Connection "upgrade";
  26. proxy_redirect off;
  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-Host $server_name;
  31. }
  32.  
  33. location /static/ {
  34. root /home/app/web;
  35. }
  36.  
  37. location /media/ {
  38. root /home/app/web;
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement