Vladimir Rusinov
January 27, 2011 12:52AM
On Jan 27, 2011 6:24 AM, "User" <nginx-forum@nginx.us> wrote:
>
> Всем привет!
> Настраиваю автоматический редирект на
> https. При вот таком варианте
> [code]
> if ($scheme = 'http')
> {
> rewrite ^(.*)$ https://xxxxxxx.ru$1 permanent;
> }
> [/code]
> редирект идет постоянно, как для
> обращений по http, так и для https... В чем
> фишка?

А в чем фишка прописывать его для всех вхостов? KISS:

Server {
Liset 1.2.3.4:80;
Server_name secure.mysite.ru;

Rewrite (.*) https://$host$1;

}

>
> Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,169949,169949#msg-169949
>
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://nginx.org/mailman/listinfo/nginx-ru
--
Sent from google android
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

$scheme

User January 26, 2011 10:23PM

Re: $scheme

Vladimir Rusinov January 27, 2011 12:52AM

Re: $scheme

User January 27, 2011 03:21AM

Re: $scheme

User January 27, 2011 09:04PM

Re: $scheme

User January 28, 2011 05:16AM

Re: $scheme

Slava Kokorin January 27, 2011 03:40AM

Re: $scheme

Slava Kokorin January 27, 2011 03:44AM

Re: $scheme

Vladimir Rusinov January 27, 2011 04:30AM

Re: $scheme

Vladimir Rusinov January 28, 2011 04:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 87
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready