Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream backend-servers {
- # Por defecto el algoritmo de balanceo es roud robin
- # descomentar (solo uno) para activar
- # least_conn;
- # ip_hash;
- # pueden ser nombres de host o dominio
- # si el servidor proxy puede resolver.
- # server backend1.example.com;
- # server backend2.example.com;
- server 1.2.3.4;
- server 5.6.7.8;
- }
- server {
- listen 80;
- server_name tu-dominio.com;
- location / {
- proxy_pass http://backend-servers;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement