-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Added availability to redirect HTTP to HTTPS and a variable "REDIREC… #6265
base: staging
Are you sure you want to change the base?
Conversation
[Nginx] move conf.d include to end of nginx.conf
…_HTTP" to configure this option
This would basically obsolete the Docs page here right? https://docs.mailcow.email/manual-guides/u_e-80_to_443 @FreddleSpl0it what do you think? |
https://docs.mailcow.email/manual-guides/u_e-80_to_443 should still work, so I don’t understand why we should change it. I don’t see any advantage. |
It doesn’t work for me. I didn’t look into it yet but can confirm that curl -v to the http endpoint returns a 200, not a 301. The docs at minimum need to be updated for the new NGINX config |
I think redirect HTTP should be the standard, and not be an option. |
I'm not sure if we should make it a standard, but I reviewed the issue with redirect.conf not working and can now confirm it. Please add the new ENV variable to
mailcow-dockerized/generate_config.sh Lines 255 to 268 in f92ddd8
Lines 896 to 942 in f92ddd8
|
Okay thanks @FreddleSpl0it, I added the variable to both scripts. But the problem that it does not work for me via the variable remains, does anyone have an idea what the problem could be? |
Looks good at first sight. Did you rebuild the Nginx Docker image? |
I removed the old Then recreated the containers with |
I played a bit around, and the expression In portainer, in the nginx-container I see the ENVs are both listed and also follows the mailcow.conf entry (y/n). Looks like that not docker is the problem, but maybe Jinja2. And also
print y or n as an answer |
…T_HTTP" to configure this option
Contribution Guidelines
What does this PR include?
Short Description
A updated NGINX config to redirect HTTP requests to HTTPS. This redirect should be activated/deactivated over the mailcow.conf, via the variable "REDIRECT_HTTP=y/n"
Affected Containers
Did you run tests?
What did you tested?
I tested and also actually run the NGINX config itself, like in the PR.
But I couldn't get the part with the variable configuration to work! I don't have enough knowledge for this, so I tried to use the variable “DISABLE_IPv6” as a guide.
What were the final results? (Awaited, got)
NGINX config itself was successfully tested, the variable part doesn't work.