| | 1 | = getssl einrichten |
| | 2 | |
| | 3 | **Achtung:** DNS-Einrichtung muss schon funktionieren, damit `getssl` funktioniert. |
| | 4 | |
| | 5 | a. für einen Web-Host mit eigenem SSL-Cert: |
| | 6 | 1. in das Verzeichnis `~root/.getssl` wechseln |
| | 7 | 1. Host-/Domain-Verzeichnis anlegen: `mkdir twiki.mtronig.de` |
| | 8 | 1. Konfigurationsdatei `twiki.mtronig.de/getssl.cfg` erstellen: |
| | 9 | {{{ |
| | 10 | # Uncomment and modify any variables you need |
| | 11 | # see https://github.com/srvrco/getssl/wiki/Config-variables for details |
| | 12 | # see https://github.com/srvrco/getssl/wiki/Example-config-files for example configs |
| | 13 | # |
| | 14 | # The staging server is best for testing |
| | 15 | #CA="https://acme-staging-v02.api.letsencrypt.org/directory" |
| | 16 | # This server issues full certificates, however has rate limits |
| | 17 | #CA="https://acme-v02.api.letsencrypt.org" |
| | 18 | |
| | 19 | #PRIVATE_KEY_ALG="rsa" |
| | 20 | |
| | 21 | # Additional domains - this could be multiple domains / subdomains in a comma separated list |
| | 22 | # Note: this is Additional domains - so should not include the primary domain. |
| | 23 | #SANS="trac.mtronig.de" |
| | 24 | |
| | 25 | # Acme Challenge Location. The first line for the domain, the following ones for each additional domain. |
| | 26 | # If these start with ssh: then the next variable is assumed to be the hostname and the rest the location. |
| | 27 | # An ssh key will be needed to provide you with access to the remote server. |
| | 28 | # Optionally, you can specify a different userid for ssh/scp to use on the remote server before the @ sign. |
| | 29 | # If left blank, the username on the local server will be used to authenticate against the remote server. |
| | 30 | # If these start with ftp: then the next variables are ftpuserid:ftppassword:servername:ACL_location |
| | 31 | # These should be of the form "/path/to/your/website/folder/.well-known/acme-challenge" |
| | 32 | # where "/path/to/your/website/folder/" is the path, on your web server, to the web root for your domain. |
| | 33 | #ACL=('/var/www/twiki.mtronig.de/web/.well-known/acme-challenge' |
| | 34 | # 'ssh:server5:/var/www/usvn.vpn21.net/web/.well-known/acme-challenge' |
| | 35 | # 'ssh:sshuserid@server5:/var/www/usvn.vpn21.net/web/.well-known/acme-challenge' |
| | 36 | # 'ftp:ftpuserid:ftppassword:usvn.vpn21.net:/web/.well-known/acme-challenge') |
| | 37 | |
| | 38 | #Set USE_SINGLE_ACL="true" to use a single ACL for all checks |
| | 39 | #USE_SINGLE_ACL="false" |
| | 40 | |
| | 41 | # Location for all your certs, these can either be on the server (full path name) |
| | 42 | # or using ssh /sftp as for the ACL |
| | 43 | DOMAIN_CERT_LOCATION="/var/www/twiki.mtronig.de/ssl/server.crt" |
| | 44 | DOMAIN_KEY_LOCATION="/var/www/twiki.mtronig.de/ssl/server.key_decrypted" |
| | 45 | CA_CERT_LOCATION="/var/www/twiki.mtronig.de/ssl/ca-bundle.pem" |
| | 46 | #DOMAIN_CHAIN_LOCATION="" # this is the domain cert and CA cert |
| | 47 | #DOMAIN_PEM_LOCATION="" # this is the domain_key, domain cert and CA cert |
| | 48 | |
| | 49 | # The command needed to reload apache / nginx or whatever you use |
| | 50 | #RELOAD_CMD="" |
| | 51 | |
| | 52 | # Define the server type. This can be https, ftp, ftpi, imap, imaps, pop3, pop3s, smtp, |
| | 53 | # smtps_deprecated, smtps, smtp_submission, xmpp, xmpps, ldaps or a port number which |
| | 54 | # will be checked for certificate expiry and also will be checked after |
| | 55 | # an update to confirm correct certificate is running (if CHECK_REMOTE) is set to true |
| | 56 | #SERVER_TYPE="https" |
| | 57 | #CHECK_REMOTE="true" |
| | 58 | }}} |
| | 59 | 1. `getssl` Konfiguration testen: `getssl twiki.mtronig.de`; \\ ggf. den Test forcieren: `getssl -f twiki.mtronig.de` \\ |
| | 60 | Das Ergebnis soll so aussehen: |
| | 61 | {{{ |
| | 62 | # getssl -f twiki.mtronig.de |
| | 63 | |
| | 64 | Registering account |
| | 65 | Verify each domain |
| | 66 | Verifying twiki.mtronig.de |
| | 67 | twiki.mtronig.de is already validated |
| | 68 | Verification completed, obtaining certificate. |
| | 69 | Requesting Finalize Link |
| | 70 | Requesting Order Link |
| | 71 | Requesting certificate |
| | 72 | Full certificate saved in /root/.getssl/twiki.mtronig.de/fullchain.crt |
| | 73 | Certificate saved in /root/.getssl/twiki.mtronig.de/twiki.mtronig.de.crt |
| | 74 | copying domain certificate to /var/www/twiki.mtronig.de/ssl/server.crt |
| | 75 | copying private key to /var/www/twiki.mtronig.de/ssl/server.key_decrypted |
| | 76 | copying CA certificate to /var/www/twiki.mtronig.de/ssl/ca-bundle.pem |
| | 77 | reloading SSL services |
| | 78 | * Gracefully restarting apache2 ... [ ok ] |
| | 79 | twiki.mtronig.de - certificate installed OK on server |
| | 80 | certificate obtained for twiki.mtronig.de |
| | 81 | # _ |
| | 82 | }}} |
| | 83 | 1. "staging"-Konfiguration auf volle Konfiguration umstellen, indem die Zeile `CA="https://acme-staging-v02.api..."` deaktiviert wird (darf schon inaktiv sein, weil die globale Konfiguration für getssl diese CA vorgibt) und stattdessen die Zeile `CA="https://acme-v02.api.letsencrypt.org"` aktiviert wird. |
| | 84 | 1. Produktiv-Zertifikat holen: \\ `getssl twiki.mtronig.de` \\ Das Ergebnis soll etwa so aussehen: |
| | 85 | {{{ |
| | 86 | # getssl twiki.mtronig.de |
| | 87 | Registering account |
| | 88 | Verify each domain |
| | 89 | Verifying twiki.mtronig.de |
| | 90 | copying challenge token to /var/www/letsencrypt/Yfh65tFtentC8QnrHM3eSH3WFfOmmcVTNlJk3XGYaRk |
| | 91 | sending request to ACME server saying we're ready for challenge |
| | 92 | checking if challenge is complete |
| | 93 | Pending |
| | 94 | checking if challenge is complete |
| | 95 | Verified twiki.mtronig.de |
| | 96 | Verification completed, obtaining certificate. |
| | 97 | Requesting Finalize Link |
| | 98 | Requesting Order Link |
| | 99 | Requesting certificate |
| | 100 | Full certificate saved in /root/.getssl/twiki.mtronig.de/fullchain.crt |
| | 101 | Certificate saved in /root/.getssl/twiki.mtronig.de/twiki.mtronig.de.crt |
| | 102 | copying domain certificate to /var/www/twiki.mtronig.de/ssl/server.crt |
| | 103 | copying private key to /var/www/twiki.mtronig.de/ssl/server.key_decrypted |
| | 104 | copying CA certificate to /var/www/twiki.mtronig.de/ssl/ca-bundle.pem |
| | 105 | reloading SSL services |
| | 106 | * Gracefully restarting apache2 ... [ ok ] |
| | 107 | twiki.mtronig.de - certificate installed OK on server |
| | 108 | certificate obtained for twiki.mtronig.de |
| | 109 | # _ |
| | 110 | }}} |
| | 111 | 1. //fertig - freu! // |