ssl
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ssl [2016/06/09 16:26] – created alex | ssl [2017/10/26 18:59] (current) – [Standalone (non-HTTP)] mb | ||
---|---|---|---|
Line 8: | Line 8: | ||
/ | / | ||
+-- example.com | +-- example.com | ||
- | | + | | \-- .well-known -> . |
+ | \-- www.example.com -> example.com | ||
+ | </ | ||
For your regular HTTP site (non-SSL) add the following to your ''< | For your regular HTTP site (non-SSL) add the following to your ''< | ||
Line 20: | Line 22: | ||
Finally run: | Finally run: | ||
< | < | ||
- | sudo certbot certonly --webroot -w / | + | sudo certbot certonly --webroot -w / |
</ | </ | ||
+ | |||
+ | **N.B.** you can append many more sub-domains on there if you want to use use multiple domains in the same certificate | ||
+ | |||
+ | Now go back to your ''< | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | Now slip into in the following lines into the block its-self: | ||
+ | < | ||
+ | SSLCertificateFile / | ||
+ | SSLCertificateKeyFile / | ||
+ | SSLCertificateChainFile / | ||
+ | Include / | ||
+ | |||
+ | RewriteEngine on | ||
+ | RewriteCond %{HTTPS} off | ||
+ | RewriteRule . https:// | ||
+ | </ | ||
+ | |||
+ | Finally, do one last reload and you should have a secure site (with your non-secure site redirecting to the secure one). | ||
+ | |||
+ | ===== Standalone (non-HTTP) ===== | ||
+ | |||
+ | Simply a case of running: | ||
+ | |||
+ | < | ||
+ | sudo certbot certonly --standalone --standalone-supported-challenges http-01 -d marmot.wormnet.eu -d imap.wormnet.eu -d smtp.wormnet.eu | ||
+ | </ | ||
+ | |||
+ | You will need to shut down any webserver listening on '' | ||
+ | |||
+ | |||
+ | Then you can tie in the certs at: | ||
+ | |||
+ | * **''/ | ||
+ | * **''/ | ||
+ | * **''/ |
ssl.1465489564.txt.gz · Last modified: 2016/06/09 16:26 by alex