A fatal 301 redirect...

Jeff Dyke jeff.dyke at gmail.com
Mon Sep 17 22:20:38 UTC 2018


I think this problem is better solved allowing 80 to be open and a separate
server block.  Since i terminate from haproxy, from memory something like
this, in the same vhost file.  Obviously you can listen here on H/2 if you
want to as well.

server {
   listen 80 default_server;
  server_name test.ppp.fr;
  return 301 https://$server_name$request_uri;
}

Best,
jeff

On Mon, Sep 17, 2018 at 6:10 PM Pierre Couderc <pierre at couderc.eu> wrote:

> I did use wrongly a 301 redirect....
>
> I have corrected now, but the redirect remains.
>
> I use wget :
>
> nous at pcouderc:~$ wget https://www.ppp.fr
> --2018-09-17 23:52:44--  https://www.ppp.fr/
> Resolving www.ppp.fr (www.ppp.fr)... 2a01:e34:eeaf:c5f0::fee6:854e,
> 78.234.252.95
> Connecting to www.ppp.fr
> (www.ppp.fr)|2a01:e34:eeaf:c5f0::fee6:854e|:443... connected.
> HTTP request sent, awaiting response... 301 Moved Permanently
> Location: https://test.ppp.fr/ [following]
> --2018-09-17 23:52:44--  https://test.ppp.fr/
> Resolving test.ppp.fr (test.ppp.fr)... 2a01:e34:eeaf:c5f0::fee6:854e,
> 78.234.252.95
> Connecting to test.ppp.fr
> (test.ppp.fr)|2a01:e34:eeaf:c5f0::fee6:854e|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: unspecified [text/html]
> Saving to: ‘index.html.3’....
>
> In access.log :
>
> 2a01:e34:eeaf:c5f0::feb1:b1c9 - - [18/Sep/2018:00:04:34 +0200] "GET /
> HTTP/2.0" 200 21511 "-" "Mozilla/5.0 (X11; Linux x86_64)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36"
> 2a01:e34:eeaf:c5f0::feb1:b1c9 - - [18/Sep/2018:00:04:34 +0200] "GET
> /fuveau.png HTTP/2.0" 404 271 "https://test.ppp.fr/" "Mozilla/5.0 (X11;
> Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81
> Safari/537.36"
>
>
> I am pretty sure that I have removed the fatal redirect, and I have
> checked that   the only 301 remaining are on port 80 :
>      location / {
>          return 301 https://$server_name$request_uri;
>      }
>
> So I suppose there is a cache somewhere where nginx keeps its secret and
> fatal 301 ? How can I remove it ?
>
> Thanks
>
> PC
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180917/e6a70a6f/attachment-0001.html>


More information about the nginx mailing list