ldirectord refusing connection when nginx redirects from http to https
        Posted  
        
            by 
                Adam
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by Adam
        
        
        
        Published on 2010-12-21T20:07:36Z
        Indexed on 
            2010/12/21
            20:55 UTC
        
        
        Read the original article
        Hit count: 333
        
nginx
|ldirectord
I am running ldirector as a load balancer to an nginx front end server.
- If I setup a redirect from http to https and connect directly to the nginx server, all is well.
- Connecting via ldirector causes my connection to be refused.
- I can connect normally via http or https through ldirector when I don't have the redirect in place.
- To add to my confusion, if my application issues a redirect from http to https, it works.
I am testing this via curl on the command line.  (curl: (7) couldn't connect to host vs a response)
I am using the standard ldirectord config (http://www.ultramonkey.org/3/topologies/config/lb/non-fwmark/linux-director/ldirectord.cf) the http and https parts.
My nginx config for the redirect is simply:
location / {
    rewrite ^(.*) https://$host$1 permanent;
}
© Server Fault or respective owner