# Why does certbot only detect one virtualhost?

**URL:** <https://community.letsencrypt.org/t/why-does-certbot-only-detect-one-virtualhost/24016>\
**Category:** Help\
**Created:** [December 12, 2016, 9:31pm UTC](https://community.letsencrypt.org/t/why-does-certbot-only-detect-one-virtualhost/24016 "2016-12-12T21:31:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![x23piracy](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/x23piracy/32/9990_2.png) [@x23piracy](https://community.letsencrypt.org/u/x23piracy)\
**Post date:** [December 12, 2016, 9:31pm UTC](https://community.letsencrypt.org/t/why-does-certbot-only-detect-one-virtualhost/24016/1 "2016-12-12T21:31:07Z")

</div>

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>

```

![](https://global.discourse-cdn.com/letsencrypt/original/2X/6/67d0098c794a502b68c3672b439a320c95a0cdcc.png)

What did i wrong?

Regards X23

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [December 13, 2016, 5:08am UTC](https://community.letsencrypt.org/t/why-does-certbot-only-detect-one-virtualhost/24016/2 "2016-12-13T05:08:06Z")

</div>

`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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [January 12, 2017, 5:08am UTC](https://community.letsencrypt.org/t/why-does-certbot-only-detect-one-virtualhost/24016/3 "2017-01-12T05:08:06Z")

</div>

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