Join the community today
Register Now

SSL Cloudflare Error too many redirects after disabling Cloudflare SSL

Discussion in 'Domains, DNS, Email & SSL Certificates' started by abakisensoy, Nov 22, 2021.

  1. abakisensoy

    abakisensoy Member

    49
    3
    8
    Dec 2, 2016
    Ratings:
    +3
    Local Time:
    12:25 PM
    latest
    5.5
    Please fill in any relevant information that applies to you:
    • CentOS Version:CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed:
    • PHP Version Installed:
    • MariaDB MySQL Version Installed:
    • When was last time updated Centmin Mod code base ? : today
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:
      Code (Text):
      cat /etc/centminmod/custom_config.inc
      


      MARCH_TARGETNATIVE='n'

    My problem is an error too many redirects after disabling Cloudflare SSL.


    curl -ksvo /dev/null http://mydomain.com --connect-to ::MYSERVERIP 2>&1 | egrep -i "< location|< http"
    < HTTP/1.1 302 Moved Temporarily
    < Location: https://mydomain.com/


    so my server redirects to SSL which causes it.

    if i remove that block from Ngnix:

    server {
    server_name mydomain.com www.mydomain.com;
    return 301 https://$server_name$request_uri;
    }


    it works but the default centminmod page comes up.

    Any idea?
     
  2. eva2000

    eva2000 Administrator Staff Member

    47,490
    10,762
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,730
    Local Time:
    12:25 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    How did you disable Cloudflare? Did you enable HSTS at origin Centmin Mod Nginx level and/or always use HTTPS or auto redirect to HTTPS on Cloudflare?