Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1.  
  2. server {
  3. listen 80 default_server;
  4. listen [::]:80 default_server;
  5. server_name sub.myserver.com;
  6. root /var/www/html;
  7. index index.html index.htm;
  8.  
  9. location / {
  10. try_files $uri $uri/ =404;
  11. }
  12. }
  13.  
  14. server {
  15. listen 80;
  16. listen [::]:80;
  17. server_name subapi.myserver.com;
  18.  
  19. location / {
  20. proxy_pass http://localhost:1337;
  21. proxy_http_version 1.1;
  22. proxy_set_header Upgrade $http_upgrade;
  23. proxy_set_header Connection keep-alive;
  24. proxy_set_header Host $host;
  25. proxy_cache_bypass $http_upgrade;
  26. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  27. proxy_set_header X-Forwarded-Proto $scheme;
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement