Created
April 28, 2015 07:23
-
-
Save waqaskhan137/0237c80047ff149c3887 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apache servers LB for lb.site.com | |
upstream lb-site.com { | |
server 192.168.200.85:8080; # virtual machine web1 site | |
server 127.0.0.1:8080 backup; # virtual machine web2 site | |
} | |
server { | |
listen 127.0.0.1:80; # public IP address of your server | |
server_name lb-site.com; | |
location / { | |
proxy_pass http://lb-site.com; | |
proxy_connect_timeout 900; | |
proxy_send_timeout 900; | |
proxy_read_timeout 900; | |
send_timeout 900; | |
proxy_redirect off; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment