redirect from http to https
mike
mike503 at gmail.com
Mon Mar 9 02:15:48 MSK 2009
On Sun, Mar 8, 2009 at 3:04 PM, Steve Zhuo <lists at ruby-forum.com> wrote:
> Hi, thanks for the reply, i enable SSL on port 443, i just didn't paste
> it. Here is a more complete version. if i use https://domain.com, it
> works no problem, just when i tried to redirect from http to https, it
> went into a redirect loop..
i don't see why it would be (first off)
try using lynx -mime_header http://foo.com/ and see what it says. i do
http to https all the time without an issue. you need to inspect the
headers and what is happening on the client side. firebug for firefox
or fiddler even could help too.
why do you have this chunk? these headers are being sent to the
upstream and there is no upstream.
> location / {
>
> # needed for HTTPS
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For
> $proxy_add_x_forwarded_for;
> proxy_set_header Host $http_host;
> }
> }
> server {
> listen 443;
> server_name www.domain.com domain.com;
>
> ssl on;
> ssl_certificate /path/myssl.crt;
> ssl_certificate_key /path/myssl.key;
>
> ssl_session_timeout 5m;
>
>
>
> location / {
> proxy_pass http://mysvr;
this would be where you would put the proxy_set_headers
> }
> }
More information about the nginx
mailing list