[Solved]: Redirect not working


#1

My domains are: nestedvar.tk nestedvariables.tk www.nestedvariables.tk www.nestedvar.tk

My web server is: Apache 2.4.7

The operating system my web server runs on is :Ubuntu 17.10

My hosting provider, if applicable, is: DigitalOcean

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

I am getting this error when i attempt to access my website after creating a certificate with certbot
“Firefox has detected that the server is redirecting the request for this address in a way that will never complete.”
I think its cause the web server is redirecting http to https and vice versa


#2

Do you have any Cloudflare page rules or redirect in place? That’s what it looks like the problem is.

Otherwise please show both all of the rewrite/redirect rules present in your Apache configuration and .htaccess file.


#3

I have the basic Cloudflare setup with SSL disabled no page rules or redirect from Cloudflare

I have a redirect for a subfolder to a discord server invite link in htaccess that’s it
and this is my Apache configurations

000-default.conf: https://hastebin.com/evuguhenix.apache
000-default-le-ssl.conf: https://hastebin.com/itijubabiq.apache
apache2.conf: https://hastebin.com/fudajojazu.apache
.htaccess: https://hastebin.com/casanopoje.apache


#4

Are you sure about that? Your domain is currently using the Cloudflare SSL proxy (even with a lookup from root nameservers).

$ openssl s_client -connect nestedvar.tk:443 -servername nestedvar.tk -showcerts 2>/dev/null | openssl x509 -noout -subject -dates -issuer
subject= /OU=Domain Control Validated/OU=PositiveSSL Multi-Domain/CN=sni79124.cloudflaressl.com
notBefore=Apr 16 00:00:00 2018 GMT
notAfter=Oct 23 23:59:59 2018 GMT
issuer= /C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO ECC Domain Validation Secure Server CA 

Something is doing a redirect from HTTPS to HTTP, but it’s not revealed in the config files you linked.

Is it your intention that you are using Cloudflare proxy right now?


#5

No it was not my intention I didn’t know that had an effect like that on my site.
Thank you it has been solved


#6

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