Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # we're in the http context here
- map $http_upgrade $connection_upgrade {
- default upgrade;
- '' close;
- }
- ################################################
- # Load Balancer
- ################################################
- upstream backend {
- sticky path=/;
- server 10.1.1.1;
- server 10.2.2.2;
- }
- server {
- listen 80;
- listen [::]:80;
- server_name www.abc.com www.ddp.abc.com;
- location / {
- proxy_pass http://backend;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection $connection_upgrade;
- 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;
- proxy_redirect off;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement