Guest User

/etc/nginx/includes/http-common.conf

a guest
Dec 9th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. upstream docservice {
  2. server localhost:8000;
  3. }
  4.  
  5. upstream spellchecker {
  6. server localhost:8080;
  7. }
  8.  
  9. upstream example {
  10. server localhost:3000;
  11. }
  12.  
  13. map $http_host $this_host {
  14. "" $host;
  15. default $http_host;
  16. }
  17.  
  18. map $http_x_forwarded_proto $the_scheme {
  19. default $http_x_forwarded_proto;
  20. "" $scheme;
  21. }
  22.  
  23. map $http_x_forwarded_host $the_host {
  24. default $http_x_forwarded_host;
  25. "" $this_host;
  26. }
  27.  
  28. map $http_upgrade $proxy_connection {
  29. default upgrade;
  30. "" close;
  31. }
  32.  
  33. proxy_set_header Host $http_host;
  34. proxy_set_header Upgrade $http_upgrade;
  35. proxy_set_header Connection $proxy_connection;
  36. proxy_set_header X-Forwarded-Host $the_host;
  37. proxy_set_header X-Forwarded-Proto $the_scheme;
  38. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  39.  
Advertisement
Add Comment
Please, Sign In to add comment