TOO_MANY_REDIRECTS error with nginx-ingress and wordpress

8/19/2020

i am facing a TOO_MANY_REDIRECTS error in my wordpress application. Below you can see some printscreens of my configuration:

Nginx Ingress Config

Nginx ConfigMap

php-fpm proxy_pass

enter image description here

-- Diego
kubernetes
nginx
nginx-ingress
php

1 Answer

8/25/2020

Try to append to a ConfigMap a new server inside the http context using the http-snippet.

For example:

...
data:
  ssl-redirect: "false"
  hsts: "true"
  server-tokens: "false"
  http-snippet: |
    server {
      listen 8000 proxy_protocol;
      server_tokens off;
      return 301 https://$host$request_uri;
    }

This will prevent overriding the original nginx.tmpl, ensuring more compatibility in case of upgrade the Nginx Ingress version.

Please take a look: ingress-too-many-redirects, too-many-redirects-with-reverse-proxy.

Useful article: too-many-redirects-wp

-- Malgorzata
Source: StackOverflow