Advertisement
Sergio_Istea

balancer

Jun 6th, 2024
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. upstream docker-backends {
  2. server 172.31.23.60:8080;
  3. server 172.31.31.247:8080;
  4.  
  5. # Por defecto el algorimo de balanceo es round robin
  6. # descomentar para activar
  7. # ip_hash;
  8. least_conn;
  9. }
  10.  
  11.  
  12.  
  13.  
  14. server {
  15. listen 80;
  16.  
  17. server_name ec2-44-220-159-217.compute-1.amazonaws.com;
  18.  
  19. # en este caso la peticion solicita por el raiz
  20. location / {
  21. proxy_set_header Host $host;
  22. proxy_set_header X-Real-IP $remote_addr;
  23.  
  24. # direccion ip y puerto del servidor que contiene el recurso
  25. proxy_pass http://docker-backends;
  26. }
  27. }
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement