Cloudflare DNS returning redirect

Hi there, let me first preface this that I'm currently running it on my virtualmin server. My SSL certificate is currently generated by the Virtualmin panel which is Let's Encrypt. Whenever the proxy is turned on, i get
The page isn’t redirecting properly

An error occurred during a connection to dev-shiftbus.com.

This problem can sometimes be caused by disabling or refusing to accept cookies
The page isn’t redirecting properly

An error occurred during a connection to dev-shiftbus.com.

This problem can sometimes be caused by disabling or refusing to accept cookies
The website in question is dev-shiftbus.com
6 Replies
Chaika
Chaika11mo ago
Hello! Redirect errors are usually caused by your SSL/TLS Setting, if you navigate to SSL/TLS -> overview, make sure it's "Full (Strict)", not "Flexible" Magic link: https://dash.cloudflare.com/?to=/:account/:zone/ssl-tls
BakaPresident
BakaPresident11mo ago
Ahh i thought flexible would work with either. Full/Full(Strict) makes sense now because i restricted the traffic to HTTPS only and now i look at the docs it says but all connections between Cloudflare and your origin are made through HTTP which probably stopped it from work. Big thanks! 😄
Chaika
Chaika11mo ago
No problem MeowHeartCloudflare Yea Flexible is insecure and makes all connections to the origin via http. If your application redirects everything to https, Cloudflare just proxies the redirect back to the visitor, which causes the endless loop
BakaPresident
BakaPresident11mo ago
Can i ask a stupid question. In my laravel i have the following routes.
Route::domain('dashboard.' . env('APP_URL'))->middleware([
'auth:sanctum',
config('jetstream.auth_session'),
'verified'
])->group(function () {
// My routes are here.
}
Route::domain('dashboard.' . env('APP_URL'))->middleware([
'auth:sanctum',
config('jetstream.auth_session'),
'verified'
])->group(function () {
// My routes are here.
}
Virtualmin i have 2 domains. dev-example.com and example.com I've added dashboard.example.com as a alias in virtualmin. However, when i access dashboard.example.com It redirects me to the dev-example.com instead of example.com I guess this is more of a virtualmin issue right. Since my IP address is the same for both domain it becomes confused on which one to use for the domain right
Chaika
Chaika11mo ago
That's the point of Server Name Identifier (SNI)/Host header, even for requests to the same IP, it can use the SNI/Host header to pick the right tls cert to serve/site/etc.
dashboard.example.com as a alias in virtualmin. However, when i access dashboard.example.com It redirects me to the dev-example.com instead of example.com
You're talking about https://dashboard.shiftbus.com ? It seems to be showing me what's on .com and not dev-, did you already fix it maybe?
ShiftBus - SG Bus Charter
Experience unparalleled travel with us – Exceptional Service, Affordability, and Flexibility united. Create your personalized route, relish in our value-driven rates, and embark on a journey where your comfort is our commitment.
BakaPresident
BakaPresident11mo ago
Nope i unfortunately are still trying to fix this. I've moved the authentication up so that dashboard.shiftbus.com is supposed to route to the login page which works fine on my localhost side. In virtualmin, i've added dashboard.shiftbus.com as an alias of shiftbus.com. I've also requested for new certificate for the following sites in virtualmin
shiftbus.com
www.shiftbus.com
dashboard.shiftbus.com
www.dashboard.shiftbus.com
shiftbus.com
www.shiftbus.com
dashboard.shiftbus.com
www.dashboard.shiftbus.com
I think cloudflare should be correct? Maybe i need to mess with the .htaccess? Pardon my ignorance i'm very new to this 😦 Nvm somehow fixed with my exact actions.. I created an alias to shiftbus.com and enabled the Apache Website Enabled and it seems to work Weird thing was it didn't use to work that time 🥹 Weird thing is virtualmin generates the SSL certificate however, i'm still using the one generated by cloudflare. But i should play around with the settings it's probably my misconfiguration