vXMPPb API Apache Virtualhost

nano /etc/apache2/sites-available/api.conf
<VirtualHost *:80>
    ServerName {URL}
    DocumentRoot /var/www/api
    ServerAdmin {EMAIL}
    ErrorLog ${APACHE_LOG_DIR}/error/api.log
    CustomLog ${APACHE_LOG_DIR}/access/api.log combined
 <Directory "/var/www/api">
    AllowOverride All
    Order allow,deny
    Allow from all
    Satisfy all
 </Directory>
</VirtualHost>
a2ensite api
service apache2 reload
certbot --webroot -w /var/www/api -d {URL}

See also, Nginx