Why does certbot only detect one virtualhost?


#1

I would like to create two certs for webmail and owncloud but --apache only offers one vhost. why?

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName ubuntu.domain.de
        DocumentRoot /var/www/html
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/owncloud
        ServerName owncloud.domain.de
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/lib/roundcube
        ServerName webmail.domain.de
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

What did i wrong?

Regards X23


#2

certbot expects the virtual host sections in different configuration files (one virtualhost section per file). From the looks of it (your post above), you’ve got them all in one file? If so, that’s probably the issue.


#3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.