Load balancer and redirect to https
Steve Zhuo
lists at ruby-forum.com
Sat May 9 05:29:00 MSD 2009
HI
I would like to setup my Load Balancer to distribute the load to
different servers, and i would also like to forward all of the incoming
http request to the https port. Here is my configuration:
upstream mysvr {
server server1:443
server server2:443
}
server {
listen 80;
server_name www.server.com server.com;
rewrite ^/(.*) https://$server_name/$1 permanent;
}
server {
listen 443;
server_name www.server.com server.com;
ssl on;
ssl_certificate /etc/ssl/certs/myssl.crt;
ssl_certificate_key /etc/ssl/private/myssl.key;
location / {
proxy_pass https://mysvr;
}
}
This doesn't work as expected, any help is appreciated.
--
Posted via http://www.ruby-forum.com/.
More information about the nginx
mailing list