Advertisement
Sergio_Istea

nginx_balancer_vhost

Oct 17th, 2023 (edited)
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. upstream backend {
  2. server backend1.example.com;
  3. server backend2.example.com;
  4. server 192.0.0.1 backup;
  5. }
  6.  
  7. server {
  8. listen 80;
  9.  
  10.  
  11.  
  12. server_name _;
  13.  
  14. location / {
  15. proxy_set_header Host $host;
  16. proxy_set_header X-Real-IP $remote_addr;
  17. proxy_pass http://backend;
  18. }
  19.  
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement