-
Notifications
You must be signed in to change notification settings - Fork 27
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
Enable letsencrypt SSL setup #748
Comments
Here's how to manually enable letsencrypt:
|
Thanks @clauded! @freephile @hexmode I think you've both done some work with Meza+Letsencrypt. Thoughts on @clauded's inputs above? Thoughts on Ansible-izing/Meza-izing it? |
Well, I just ran sudo meza deploy monolith and lost my haproxy.cfg settings...
Also the letsencrypt port (54321) could be a variable and opened by Ansible. |
Looks good to me. I've tried 3 approaches:
This last approach requires that you delete the meza.cert and meza.key file in /etc/haproxy/certs (leaving only .pem files in the directory). In the example above |
I've tested the third approach and it works fine. Here's a script (install-le) to automate this while waiting for an Ansible solution:
|
I'm trying to perform the steps outlined above for a meza 31.8.2 centos7 system. I've opened up firewalld to tcp traffic on port 54321, but the "certbot certonly.." command in step 2 is failing on the verification of the challenge with the following message:
my site is indeed "emw-meza.site" but the "/.well-known/acme-challenge/..." path doesn't make sense to me. What am I missing? |
You need to create that directory structure in the document root and make it writable by the web server. |
thanks. but gonna have to wait now.. letsencrypt has a rate limit on failures per hour it will tolerate |
I think certbot is indeed creating the challenge folder and token content, however, i think the problem is the .htaccess file that meza creates does not allow token file certbot is creating at /.well-known/acme-challenge to be seen by letsencrypt (or anyone). Is this likely? Is there an easy change I can make to .htaccess that will allow content off of /opt/htdocs/something_not_a_wiki/ to be seen? |
I have confirmed this by creating the folder /opt/htdocs/.well-known/acme-challenge/test.txt and confirmed that https://mysite/.well-known/acme-challenge/test.txt results in a 404. This is a default install of meza 31.8.1. |
I have a working version of this in my 34.x branch I didn't implement the renewal cron because the packages installed by Debian and CentOS setup cron or system.d timers (https://certbot.eff.org/docs/using.html#automated-renewals) I am working on a renewal hook (or installer plugin for HAProxy) that would concatenate ALL certificates in case a Meza system serves more than a single FQDN. |
Various updates to Certbot/Haproxy Detect email setting for certbot Remove any pre-existing meza.pem and key files Concatenate all certificates into pem files for haproxy Remove code to generate self-signed meza.pem Remove redundant notify Remove commented code
Our HAProxy role has some leftover portions (from the tutorial used to create it) commented out which enable letsencrypt SSL setup. It'd be great to automate that for meza.
The text was updated successfully, but these errors were encountered: