Welcome! Log In Create A New Profile

Advanced

Re: http to https rewrite, non-standard port?

August 03, 2011 03:10PM
On Wed, Aug 03, 2011 at 12:42:43PM +0400, Maxim Dounin wrote:
> Hello!
>
> On Wed, Aug 03, 2011 at 04:20:39AM -0400, Quincy wrote:
>
> > I have the same problem. I can't redirect http to https. Here is my
> > config:
> >
> > server {
> > listen 2121;
> > server_name XXXXX;
> > ssl on;
> > ssl_certificate XXt;
> > ssl_certificate_key XX;
> > #server_name _;
> > server_name_in_redirect off;
> > port_in_redirect off;
> >
> > root XXX;
> >
> > location / {
> > index index.php;
> > error_page 404 = @mediawiki;
> > error_page 497 = @https;
>
> Setting "error_page 497" is usesless as nginx won't read and parse
> http headers for invalid requests. Move it to server level.

As to 497 error nginx parses completely request headers, so it knows
$host, $request_uri, $uri, etc. However, nginx throws this code before
it will look up locations.


--
Igor Sysoev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

http to https rewrite, non-standard port?

J2R December 06, 2010 06:52AM

Re: http to https rewrite, non-standard port?

Igor Sysoev December 06, 2010 07:04AM

Re: http to https rewrite, non-standard port?

Quincy August 03, 2011 04:20AM

Re: http to https rewrite, non-standard port?

cyberjar09 January 07, 2013 05:01AM

Re: http to https rewrite, non-standard port?

Maxim Dounin August 03, 2011 04:44AM

Re: http to https rewrite, non-standard port?

Igor Sysoev August 03, 2011 03:10PM

Re: http to https rewrite, non-standard port?

Igor Sysoev August 03, 2011 03:06PM

Re: http to https rewrite, non-standard port?

Quincy August 04, 2011 05:04AM

Re: http to https rewrite, non-standard port?

cyberjar09 January 07, 2013 04:16AM

Re: http to https rewrite, non-standard port?

cyberjar09 January 07, 2013 04:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
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