Can't create cert ispconfig/haproxy

Put this in the vhost file for the site:

RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]

Now dry run works but through ISPconfig it still fails with the same error. Seems like ISPconfig uses webroot plugin for certbot but a dry run with that also works. Not sure what the exact command ISPconfig runs is.