moving servers... https woes.

Lukas Tribus luky-37 at hotmail.com
Tue Mar 25 21:22:25 UTC 2014


Hi,


> Mainly because I can't seem to get it to work - nginx, apache or
> iptables.
>
> I'm sure someine can come forward with technical reasons why...

In this thread you asked about how this could be done, you didn't say
that you already tried something and that it didn't work.

So you are hoping that someone may be able to provide the technical
reason for a failure you didn't even mention in the first place (let alone
some details)?



As for your original question, I would configure the old server like this,
to pass the requests to the new server:

server {
    listen       80;
    location / {
        proxy_pass       http://<newserverip>:80;
        proxy_set_header Host     $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}
server {
    listen       443 ssl;
    location / {
        proxy_pass       https://<newserverip>:443;
        proxy_set_header Host      $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}




Regards,

Lukas 		 	   		  


More information about the nginx mailing list