I’m trying to get caddy to work with dynamic tls. My current setup is with apache and lets encrypt.
I have a crm that allows us to add a records for custom domains.
The CRM instructions state to change ports.conf to 8081.
Then caddy file is:
Caddyfile
Global options block
{
on_demand_tls {
ask http://localhost:8081/api/caddy_domain_check
interval 2m
burst 5
}
}
HTTPS configuration for your domain
:443 {
tls mail@domain.com {
on_demand
}
encode gzip
# Reverse proxy to Apache (on port 8081, serving /var/www/html)
reverse_proxy localhost:8081 {
header_up X-Real-IP {http.reverse-proxy.upstream.address}
}
}
and then Apache 000-default.conf is
<VirtualHost *:8081>
ServerAdmin webmaster@localhost
ServerName domain.com
ServerAlias *.domain.com *
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml
</IfModule>
I’ve set this up but it doesn’t work.
Do I need to disable my 000-default-le-ssl.conf file?
I do need apache at all?