This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
apache [2021/09/22 18:58] admin |
apache [2021/09/22 19:18] (current) admin [Example Virtual Host] |
||
---|---|---|---|
Line 11: | Line 11: | ||
ErrorLog ${APACHE_LOG_DIR}/opensource.glasgow.social-error.log | ErrorLog ${APACHE_LOG_DIR}/opensource.glasgow.social-error.log | ||
- | CustomLog ${APACHE_LOG_DIR}/opensource.glasg0w.social-access.log combined | + | CustomLog ${APACHE_LOG_DIR}/opensource.glasgow.social-access.log combined |
</VirtualHost> | </VirtualHost> | ||
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> |