# Apache VirtualHost for Clover Printer Tool (subdomain)
# Copy to: /etc/apache2/sites-available/clover-printer.conf
# Enable: sudo a2ensite clover-printer.conf
# Replace clover.yourdomain.com with your subdomain

<VirtualHost *:80>
    ServerName clover.yourdomain.com

    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:3001/
    ProxyPassReverse / http://127.0.0.1:3001/

    ErrorLog ${APACHE_LOG_DIR}/clover-printer-error.log
    CustomLog ${APACHE_LOG_DIR}/clover-printer-access.log combined
</VirtualHost>

# HTTPS (after running: sudo certbot --apache -d clover.yourdomain.com)
# Certbot will create a *:443 VirtualHost automatically.
# Or add manually:
#
# <VirtualHost *:443>
#     ServerName clover.yourdomain.com
#
#     SSLEngine on
#     SSLCertificateFile /etc/letsencrypt/live/clover.yourdomain.com/fullchain.pem
#     SSLCertificateKeyFile /etc/letsencrypt/live/clover.yourdomain.com/privkey.pem
#
#     ProxyPreserveHost On
#     ProxyPass / http://127.0.0.1:3001/
#     ProxyPassReverse / http://127.0.0.1:3001/
#
#     ErrorLog ${APACHE_LOG_DIR}/clover-printer-ssl-error.log
#     CustomLog ${APACHE_LOG_DIR}/clover-printer-ssl-access.log combined
# </VirtualHost>
