Question

ERR_TOO_MANY_REDIRECTS - ssl certbot / cms wordpress / standart .htaccess

Hello anyone can help me solve my issue about ERR_TOO_MANY_REDIRECTS

OS: centos 7 64bit Php version: 7.2

thanks

My VirtualHost conf

<VirtualHost *:80>
    ServerName www.gloryragnarok.com
    ServerAlias gloryragnarok.com
    DocumentRoot /var/www/gloryragnarok.com/html
    ErrorLog /var/www/gloryragnarok.com/log/error.log
    CustomLog /var/www/gloryragnarok.com/log/requests.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =gloryragnarok.com [OR]
RewriteCond %{SERVER_NAME} =www.gloryragnarok.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

and

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName www.gloryragnarok.com
    ServerAlias gloryragnarok.com
    DocumentRoot /var/www/gloryragnarok.com/html
    ErrorLog /var/www/gloryragnarok.com/log/error.log
    CustomLog /var/www/gloryragnarok.com/log/requests.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/gloryragnarok.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/gloryragnarok.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/gloryragnarok.com/chain.pem
</VirtualHost>
</IfModule>

my .htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

i also use cloudflare but on development mode

thanks ^^


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello,

I believe that your Wordpress site and home URLs are currently set to http://yourdomain.com rather than https://yourdomain.com. That’s why when you add the https redirect you get a redirect loop.

You can change your Site and Home URLs via your Wordpress admin area -> Go to Settings -> General screen in a single site installation of WordPress, there are two fields named “WordPress Address (URL)” and “Site Address (URL)”.

As always, make sure to create a backup before making any changes.

Hope that this helps. Regards, Bobby