ERR_TOO_MANY_REDIRECTS on fresh install

My domain is: http://bl3zone.com

I ran this command: Followed this tutorial: https://devanswers.co/lets-encrypt-ssl-apache-ubuntu-18-04/

It produced this output: As expected in the tutorial

My web server is (include version): Apache 2.4

The operating system my web server runs on is (include version): Ubuntu 18.04

My hosting provider, if applicable, is: AWS

I can login to a root shell on my machine (yes or no, or I don’t know): Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.31.0

I followed the named tutorial to install SSL on my website. I initially had the following Apache laravel.conf file:

<VirtualHost *:80>
ServerName bl3zone.com
ServerAlias www.bl3zone.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/bl3zone/public

<Directory /var/www/html/bl3zone>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

During the tutorial I selected

2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for new sites, or if you're confident your site works on HTTPS. You can undo this change by editing your web server's configuration.

which edited the laravel.conf file and added the following 4 rows at the bottom of the file:

RewriteEngine on
RewriteCond %{SERVER_NAME} =bl3zone.com [OR]
RewriteCond %{SERVER_NAME} =www.bl3zone.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

It also create a new .conf file named laravel-le-ssl.conf with the following code inside:

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName bl3zone.com
ServerAlias www.bl3zone.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/bl3zone/public

<Directory /var/www/html/bl3zone>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/bl3zone.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/bl3zone.com/privkey.pem
</VirtualHost>
</IfModule>

When I try to access the website it says ERR_TOO_MANY_REDIRECTS. Does someone know how I could solve this since I haven’t made any other changes. My website is a Laravel app.

Every time this thread appears, it’s because of Cloudflare. Need a better fix for this :frowning: .

Can you please go into Cloudflare and set your SSL option to “Full (Strict)”?

More info here: https://support.cloudflare.com/hc/en-us/articles/200170416-End-to-end-HTTPS-with-Cloudflare-Part-3-SSL-options

1 Like

I really hope that you are right since I have been struggling with this for almost 2 days now. I just did what you told me to do and getting Error 522: Connection timed out now instead.

1 Like

Regarding the HTTP 522 error you’re getting now - are you sure you have opened port 443 in your EC2 instance firewall (if any) and AWS security group?

If you are comfortable posting your EC2 public IP address, we can check for you.

1 Like

You are an angle, thanks for the help! I totally forgot to open port 443.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.