Want to subscribe to topics you're interested in?
Become a Member

Moved from Google Domains to Cloudfare

Discussion in 'Domains, DNS, Email & SSL Certificates' started by BoostN, Jun 18, 2023.

  1. BoostN

    BoostN Active Member

    134
    27
    28
    Aug 19, 2014
    Ratings:
    +42
    Local Time:
    7:42 AM
    1.13.6
    10.0.34
    I'm having an issue with Cloudfare after moving one domain from Google Domains.

    I'm getting a "ERR_TOO_MANY_REDIRECTS" and my monitoring is firing both up and down every 15 mins..

    Not sure what's going on.

    Site Name: ecodieselram.com

    Cloudfare SSL settings
    upload_2023-6-17_21-16-14.png
    Location: /usr/local/nginx/conf/conf.d
    Filename: ecodieselram.com.ssl.conf


    Code:
    #x# HTTPS-DEFAULT
     server {
       listen   80;
    #x#   listen   [::]:80;
       server_name ecodieselram.com www.ecodieselram.com;
       return 302 https://ecodieselram.com$request_uri;
       root /home/nginx/domains/ecodieselram.com/public;
       include /usr/local/nginx/conf/staticfiles.conf;
     }
    
    #     
    
    server {
      listen 443 ssl http2 reuseport;
     
      server_name ecodieselram.com www.ecodieselram.com;
    
      include /usr/local/nginx/conf/ssl/ecodieselram.com/ecodieselram.com.crt.key.conf;
      include /usr/local/nginx/conf/ssl_include.conf;
     
     
      ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
      ssl_prefer_server_ciphers   on;
      add_header X-Xss-Protection "1; mode=block" always;
      add_header X-Content-Type-Options "nosniff" always;
      ssl_buffer_size 1369;
      ssl_session_tickets on;
     
      resolver 8.8.8.8 8.8.4.4 1.1.1.1 1.0.0.1 valid=10m;
      resolver_timeout 10s;
      ssl_stapling on;
      ssl_stapling_verify on;
    
      access_log /home/nginx/domains/ecodieselram.com/log/access.log combined buffer=256k flush=5m;
      error_log /home/nginx/domains/ecodieselram.com/log/error.log;
    
      include /usr/local/nginx/conf/autoprotect/ecodieselram.com/autoprotect-ecodieselram.com.conf;
      root /home/nginx/domains/ecodieselram.com/public;
      include /usr/local/nginx/conf/503include-main.conf;
    
        location / {
          rewrite ^/(.*) https://www.$server_name/forum/ permanent;
    
        location /forum/ { 
          index index.php index.html index.htm; 
          try_files $uri $uri/ /forum/index.php?$uri&$args; 
        } 
        location /forum/admin.php { 
             #auth_basic "Private"; 
             #auth_basic_user_file /usr/local/nginx/conf/htpasswd_admin_php; 
                include /usr/local/nginx/conf/php.conf; 
                allow 127.0.0.1; 
                allow 45.79.200.98; 
                #deny all; 
        } 
        location /forum/install/data/ { 
             internal; 
        } 
        location /forum/install/templates/ { 
             internal; 
        } 
        location /forum/internal_data/ { 
             internal; 
        } 
        location /forum/library/ { 
             internal; 
        }
        location /forum/src/ { 
             internal; 
        }
      }
    
      include /usr/local/nginx/conf/php.conf;
     
      include /usr/local/nginx/conf/pre-staticfiles-local-ecodieselram.com.conf;
      include /usr/local/nginx/conf/pre-staticfiles-global.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/drop.conf;
      include /usr/local/nginx/conf/vts_server.conf;
    }
    
    I'm unsure what has changed from Google Domains to Cloudfare?
     
  2. BoostN

    BoostN Active Member

    134
    27
    28
    Aug 19, 2014
    Ratings:
    +42
    Local Time:
    7:42 AM
    1.13.6
    10.0.34
  3. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    It's because you have Nginx 302 redirect for non-https to https and also Cloudflare Flexible SSL mode. If you have SSL setup on Centmin Mod Nginx side, you can remove 302 redirect from Nginx vhost site and set Cloudflare to Full SSL mode.