Create the Apache vhost
First thing to do is create the config for the new site as a separate file at /etc/apache2/sites-available/DOMAIN.NAME.conf:<VirtualHost *:80>
ServerName DOMAIN.NAME
ServerAlias www.DOMAIN.NAME
DocumentRoot /var/www/DOMAIN
<Directory /var/www/DOMAIN>
# DirectoryIndex my_landing_page.html
Options -Indexes
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/DOMAIN-error.log
CustomLog ${APACHE_LOG_DIR}/DOMAIN-access.log combined
</VirtualHost>
Next, enable it:sudo a2ensite DOMAIN.NAME.conf
sudo systemctl reload apache2
Your site is now up and running. If the DNS is not currently pointing at the new location, e.g. if this is a site being migrated from elsewhere, you can put the domain and new IP in your hosts file locally in order to test everything is working. Once you're happy, update the DNS to make the new server public.Run Certbot for the new domain
Assuming you want to enable HTTPS for the new site, once DNS is pointing to the new server, run Certbot:sudo certbot --apache -d DOMAIN.NAME -d www.DOMAIN.NAME
Certbot will detect the new Apache config, verify domain ownership by creating files on your server, issue and install the certificate, and additionally set up an HTTP to HTTPS redirect - you don't have to do this yourself in .htaccess.