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

Text for new file, docs/CertDeployment #880

Open
ZjYwMj opened this issue Jul 3, 2022 · 0 comments
Open

Text for new file, docs/CertDeployment #880

ZjYwMj opened this issue Jul 3, 2022 · 0 comments

Comments

@ZjYwMj
Copy link

ZjYwMj commented Jul 3, 2022

I suggest to add the following text as docs/CertDeployment. To help those without the full picture of what should be done.

There is a similar, more terse, suggestion for nginx at the comments of the deploy-cert hook.

Apache 2.4 on Debian 11 (bullseye) cert deploymemnt suggestion:

Referring to cert.pem, chain.pem, fullchain.pem and privkey.pem:
By default, on Debian 11 (bullseye), those files are at /var/lib/dehydrated/certs/domain/ . It could be noticed that

# cat cert.pem chain.pem | diff - fullchain.pem

shows the concatenation of cert.pem and chain.pem results in fullchain.pem.

  1. cp cert.pem domain.crt. Its permission can be world readable.
  2. Copy and paste the first certificate section of chain.pem, that is the first "-----BEGIN CERTIFICATE-----" section, into a text file named intermediate.pem.
  3. mv domain.crt intermediate.pem /etc/ssl/certs/. Their permissions can be world readable.
  4. cp privkey.pem /etc/ssl/private/domain.key. Its permissions should keep it private.
  5. Adjust your web server config to something like
<VirtualHost _default_:443>
        ServerName me.tld:443
        ServerAlias www.me.tld
        DocumentRoot /var/www/me.tld/html
        SSLEngine on
        SSLCertificateFile    /etc/ssl/certs/domain.crt
        SSLCertificateKeyFile /etc/ssl/private/domain.key
        SSLCertificateChainFile /etc/ssl/certs/intermediate.pem
        SSLProtocol TLSv1.2
        SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
        SSLHonorCipherOrder on
        <Directory /var/www/me.tld/html>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>
</VirtualHost>
  1. Restart the web server service.

Test at https://www.ssllabs.com/ssltest/analyze.html?d=me.tld

This procedure can be fully, or partially, automated by the deploy_cert hook.

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

No branches or pull requests

1 participant