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        [email protected]
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to