apt update
apt upgrade
apt install apache2
sudo nano /etc/apache2/sites-enabled
<VirtualHost *:80>
ServerAdmin webmaster@example.com
ServerName example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog ${APACHE_LOG_DIR}/example.com_error.log
CustomLog ${APACHE_LOG_DIR}/example.com_access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@anotherexample.com
ServerName anotherexample.com
DocumentRoot /var/www/anotherexample.com/public_html
ErrorLog ${APACHE_LOG_DIR}/anotherexample.com_error.log
CustomLog ${APACHE_LOG_DIR}/anotherexample.com_access.log combined
</VirtualHost>
sudo a2enmod ssl
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d example.com