-
Notifications
You must be signed in to change notification settings - Fork 510
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
Fixed problem to switch to https with a nginx proxy #887
Comments
Thanks for the information. |
More insight about why FreeScout was failing and why How FreeScout behaveIn the HttpsRedirect middleware, FreeScout redirects to the https version if all the following conditions are met:
For people who might read this ticket and do not know what the The All of this is standard behavior and FreeScout handles it correctly. The reverse-proxy configurationIn order to use FreeScout with a reverse-proxy that handles TLS, there is two things to do :
The What went wrong and how it was fixedEvery seems to be fine:
However this configuration alone doesn't work. When opening FreeScout, it redirects to the same https page. And because we already are on the https page, it causes a infinite redirect loop. In fact, FreeScout behave as if it never received the This is due to the architecture itself: the reverse-proxy is on a virtual machine and FreeScout on a second one, which means that there is, on this second VM, an other web server that runs FreeScout. This web server does not knows it runs behind a reverse-proxy and, because the Hence, the solution is to configure this second web server to add this header back. Using |
We've added a link to this information to the Installation Guide. |
I share a solution with you; I saw that there had been a few closed tickets on the subject, unfortunately without a relevant solution for my case. This will probably help others. Maybe it can improve FAQ or documentation :)
The situation :
I have a server with proxmox. All the traffic arrives at a first VM that serves as a proxy. Freescout is on another VM and receives traffic from this proxy. Unfortunately, the basic configuration didn't work: either we have mixed content (some of the links rewritten in https but not all of them) if the freescout .env is set with
APP_FORCE_HTTPS=FALSE;
or the site is inaccessible when we switch toAPP_FORCE_HTTPS=TRUE
, because Freescout's VM doesn't have ssl (certificat is on the proxy).The trick is to add the parameter
fastcgi_param HTTPS on;
in one of the blocks of the conf nginx of the freescout VM, in the partlocation ~ \.php$
.On the proxy, the nginx configuration looks like this :
And on the VM Freescout, the nginx configuration look like this :
Now, it's work and all is on https !
The text was updated successfully, but these errors were encountered: