Skip to content
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

Add redirect HTTP tp HTTPS in NGING config #6263

Open
Scuruba opened this issue Jan 24, 2025 · 4 comments
Open

Add redirect HTTP tp HTTPS in NGING config #6263

Scuruba opened this issue Jan 24, 2025 · 4 comments

Comments

@Scuruba
Copy link

Scuruba commented Jan 24, 2025

Summary

Redirect HTTP to HTTPS is not activated at default and was only possible via creating a new file.
https://docs.mailcow.email/manual-guides/u_e-80_to_443/

For me, his will not work anymore after updating to 2025.1. The file will be imported, but the ports and sites will be doubled with nginx.conf.j2

Motivation

The redirect should work and also be the standard configuration.
I think the best option is to add it in the "nginx.conf.j2" file and define a config variable to deactivate it.

Additional context

I tried to change the file as described, but was not able to set the variable in mailcow.conf, so the configuration was changed.

@Scuruba
Copy link
Author

Scuruba commented Jan 24, 2025

#Scuruba@f8fbba2

@mac-linux-free
Copy link

How can I test this feature?

@Scuruba
Copy link
Author

Scuruba commented Jan 24, 2025

#Scuruba@f8fbba2

You can change the nginx.conf.j2 file like in my commit. But not with the variable REDIRECT_HTTP, but as if it had been answered with yes.
I try to make a commit with the other changes I made next week, but unfortunately that didn't work for me with the variables.

The config itself is working.

@Clete2
Copy link

Clete2 commented Jan 25, 2025

You should open a PR for this feature. REDIRECT_HTTP should default to yes when HTTP is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants