-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CloudFlare SSL and redirection on Apache+Nginx setup #1786
Comments
Thanks for this detailed info. The SSL + Reverse Proxy is most definitely the cause. Weirdly we run getgrav.org with nginx reverse proxy to apache under SSL without issue. But I think this is because the SSL is at a higher cloudflare level. |
Am using cloudlflare ssl as well, but not sure if it is purely related to this setup.
returns the config setting my workaround:
|
I had the same problem, arose recently, cannot be sure when. The fix from @rallisf1 Worked for me, I think. Not yet tested extensively. |
This is still an issue after the latest upgrade. I applied the fix again and everything seems to work again. |
I hope this will be fixed in 1.6 |
Fixed in 1.6 |
Any idea when 1.6 will be out of beta? This bug catches me out every time I update 1.5. Thanks |
Soonish!.. was hoping to have it out in December, but got caught out by holidays... |
Cool. Thanks. I can wait. |
I am hosting a grav website at a Plesk shared hosting with Apache 2.2, PHP 7.1 and nginx as reverse proxy. It is a free hosting plan thus i get no SSL options for this. So i setup cloudflare for the domain and all hell broke loose.
Problem 1: Could not redirect to https
Force SSL option in the configuration would not work (both Chrome and Firefox return redirect error).
Problem 2: All the rendered links now included a :80 port in the url which made them useless
Read about a similar problem at #1690
Not completely familiar with grav source code but i got around this by editing
/system/src/Grav/Common/Uri.php
i replaced
return ($this->scheme === 'http' && $this->port === 80) || ($this->scheme === 'https' && $this->port === 443);
with
return ($this->port === 80 || $this->port === 443);
I have posted my system info here: https://gist.github.com/rallisf1/95234ad819bc8cafa5b00deaa572ae98
I suppose everyone else with the same problem can use the workaround above until an official fix comes out.
Cheers.
The text was updated successfully, but these errors were encountered: