I have a OwnCloud install on Debian, using apache. I've successfully configured a lets encrypt certificate and that's working great on files.example.com.
I'd like another domain pointing to the same as well but using the domain files.example.net. I've created a new conf file for apache, used a2ensite to create a link, restarted apache. I changed the server name in the conf to match the extra domain but when I go to run the cert bot command with -d files.example.net I get the following error;
Cannot find a cert or key directive in /files/etc/apache2/sites-available/001-default.conf/VirtualHost. VirtualHost was not modified
Unable to find cert and/or key directives
Below is the 2nd conf file for apache, the 1st one is identical other than the domain names.
<VirtualHost *:443>
ServerName files.extradomain.com
ServerAlias files.extradomain.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/owncloud
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =files.extradomain.com
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
</VirtualHost>