Issue creating certificate for OwnCloud?

I tried creating a certificate for my OwnCloud installation, but I’ve run into a strange error as follows:

Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.

apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 17 of /etc/apache2/sites-enabled/ Expected </VirtualHost> but saw </VirtualHost></IfModule>

My OwnCloud’s vHost config file is (not really). The error doesn’t appear for any other sites that I have tried, so I am stumped. The vHost file itself is extremely simple, with just a ServerAlias and a pointer to the document root.

What are the lines near line 17 of /etc/apache2/sites-enabled/ ?

I successfully got a certificate on my owncloud installation using the webroot plugin.
First it didn’t work, but then I figured out i had to add
RewriteRule ^\.well-known/acme-challenge - [L]
to the ownclouds .htaccess mod_rewrite section. This prevents the authentication request being redirected by ownclouds carddav/caldav parts…

I don’t known if it helps for your current issue, but it may help later.

This worked for me! Thank you! :slight_smile: