Welcome! Log In Create A New Profile

Advanced

Re: too_many_redirects

Francis Daly
July 24, 2019 06:28PM
On Wed, Jul 24, 2019 at 06:33:10PM +0300, Gregory Edigarov via nginx wrote:

Hi there,

> Having this setup:
>
> nginx (on host) -> nginx (in docker-nginx [WP site resides here]) ->
> php-fpm(in docker-php)
>
> got the error: too many redirects.
>
> what could be the problem?

What request do you make?

What response do you get?

What response do you want instead?

The output of "curl -i https://example.com/your/request" will probably
answer the first two.

> config on host nginx:
>
> server {
>    listen 80;
>    listen 443 ssl http2;
>    server_name example.com;
>    if ($scheme = http) {return 301 https://$server_name$request_uri;}

As an aside - it is usually nicer to do that using two server{}s, one
for http and one for https.

>    location / {
>        proxy_pass http://127.0.0.1:8181;
>     proxy_redirect        off;

It may be that changing that to turn a "http://" redirect into a
"https://" one will make everything work as you want.

The "curl -i" output may show if that is the case.

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

too_many_redirects

Gregory Edigarov via nginx July 24, 2019 11:34AM

Re: too_many_redirects

Francis Daly July 24, 2019 06:28PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 199
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready