-
Notifications
You must be signed in to change notification settings - Fork 217
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
Change haproxy.cfg to enable http->https redirect and optional certbot #2288
Comments
For the record: it seems However I'm afraid this will run a lot of other stuff periodically from ubuntu cron configuration which I'm not sure it's desirable. |
This is implemented in PR #2294, together with other improvements. |
closing this ticket because the PR is closed |
I suggest that the recipe for letsencrypt in this proposal become part of the docker readme. I just tested it and it works for me. My reason for doing this is that apparently there is some kind of time restriction in firefox (and maybe other browsers) on continuing to access a site (even a local site) with an invalid certificate. Or since this issue is closed does it mean that this approach has been replaced with something else? |
@billpage This issue is closed because the Docker image for CoCalc Further discussion of cocalc-docker happens there. Regarding Letsencrypt and CoCalc-Docker, there is a discussion around |
Admittedly I don't know all the implications of this, but here's my proposal:
This has two consequences:
a. The haproxy in port 80 will not serve any content, redirecting everything to https.
(not only a security issue but also see e.g. #2000 (comment))
b. There will be an exception for
/.well-known/acme-challenge
which would be served using the static backend from/cocalc/src/static/.well-known/acme-challenge/
which can be used as webroot for certbot.Note that this actually doesn't do anything to install or activate certbot, but with this configuration in place is easy to install a letsencrypt certificate.
Possible instructions to do it (assuming my proposed
haproxy.cfg
is installed):<DOMAIN>
and<EMAIL>
)haproxy
expects it:This does not automate renewals. At renewal time (i.e. every month?) one has to do something like:
I haven't tested renewals yet, as I understand it it is safe to run
certbot renew
once or twice a day since it won't do a thing if the certificate is not old. I don't know how to automate this inside the docker container, sincecron
is not running.Any suggestion? A worthwhile goal would be to have a single script that when executed will do steps 2-5 above and make sure the certificate is periodically renewed.
NOTE: the patch above and the suggested steps are just configuration, I make no copyright claim, use it freely, keep the pieces if it breaks, etc.
The text was updated successfully, but these errors were encountered: