This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
apache [2021/09/22 18:15] admin |
apache [2021/09/22 18:18] (current) admin [Example Virtual Host] |
||
|---|---|---|---|
| Line 21: | Line 21: | ||
| cd /etc/apache2/sites-available/ | cd /etc/apache2/sites-available/ | ||
| sudo a2ensite glasgow.opensource.social | sudo a2ensite glasgow.opensource.social | ||
| + | </code> | ||
| + | |||
| + | Now we can use certbot to generate Let's Encrypt certificates and get SSL working on this new domain: | ||
| + | |||
| + | <code bash> | ||
| + | sudo apt install certbot | ||
| + | sudo certbot | ||
| + | </code> | ||
| + | |||
| + | It'll ask you which domain you want to generate a certificate for. You can add the following line to the apache config (just under ServerName) if you want to also get the www. version of the site working: | ||
| + | |||
| + | <code> | ||
| + | ServerAlias www.opensource.glasgow.social | ||
| </code> | </code> | ||