Letsencrypt with Apache Reverse Proxy
Sample vhost configuration:
<VirtualHost *:80>
ServerName dos.archive.computer
ServerAdmin webmaster@localhost
ProxyPreserveHost On
DocumentRoot /var/www/html/dos.archive.computer
ProxyPass /.well-known !
ProxyPass / http://10.0.3.10/
ProxyPassReverse / http://10.0.3.10/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
#The below lines are just for auto-redirecting to https
RewriteEngine on
RewriteCond %{SERVER_NAME} =dos.archive.computer
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Create .well-known folder
wget https://dl.eff.org/certbot-auto
chmod a+x ./certbot-auto
./certbot-auto
setup crontab with the follwing:
30 2 * * 1 /usr/local/sbin/certbot-auto renew >> /var/log/letsencrypt-renew.log
Above line really depends on where you installed certbot-auto – sometimes it will be in the root home directory if thats where you did the wget to.