# Letsencrypt-auto won't see the Apache vhosts anymore

**URL:** <https://community.letsencrypt.org/t/letsencrypt-auto-wont-see-the-apache-vhosts-anymore/4472>\
**Category:** Help\
**Created:** [November 25, 2015, 6:02pm UTC](https://community.letsencrypt.org/t/letsencrypt-auto-wont-see-the-apache-vhosts-anymore/4472 "2015-11-25T18:02:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![corneliu](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/corneliu/32/2263_2.png) [@corneliu](https://community.letsencrypt.org/u/corneliu)\
**Post date:** [November 25, 2015, 6:02pm UTC](https://community.letsencrypt.org/t/letsencrypt-auto-wont-see-the-apache-vhosts-anymore/4472/1 "2015-11-25T18:02:57Z")

</div>

I am running Apache/2.4.16 on a 12.04.5 Ubuntu. When the beta was first opened a while back I have successfully ran the letsencrypt client and install a few certificates.

Recently I wanted to install a certificate for a new domain and I was running the usual command

```nohighlight
./letsencrypt-auto --apache --server https://acme-v01.api.letsencrypt.org/directory --agree-dev-preview 

```

and received

> No names were found in your configuration files. You should specify ServerNames in your config files in order to allow for accurate installation of your certificate  
> If you do use the default vhost, you may specify the name manually.  
> Would you like to continue?

which was weird. `apache2ctl configtest` gives `Syntax OK`, and `apache2ctl -S` correctly displays all the vhost I have.

Anyway, I went further with the `letsencrypt-auto`'s dialog

> Please enter in your domain name(s) (comma and/or space separated)  
> _[my.domain.com](http://my.domain.com)_

but no joy:

> No vhost exists with servername or alias of: [my.domain.com](http://my.domain.com). No  
> vhost was selected. Please specify servernames in the Apache config

_[my.domain.com](http://my.domain.com)_ is available on http and its `.conf ` file looks like

```nohighlight
<VirtualHost *:80>
    DocumentRoot "/home/..."
    ServerName my.domain.com
    ServerAdmin ..@...

    <Directory "/...">
        AllowOverride All
        Require all granted
        Options -Indexes
    </Directory>

    ErrorLog /var/log/apache2/...
    LogLevel warn
    LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
    CustomLog /var/log/apache2/... "vhost_combined"
</VirtualHost>

```

I searched for similar problems but I couldn't find any. I also tried to renew some of the existing domains, but the same thing happened.

For what it's worth, I was using the commit [3256916](https://github.com/letsencrypt/letsencrypt/commit/3256916e87db90b4ad15071d89097d3c2c66332c) of the letsencrypt client.

Do you have any ideas?

---

<div class="post-metadata">

**Author:** ![gasp](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/gasp/32/3675_2.png) [@gasp](https://community.letsencrypt.org/u/gasp)\
**Post date:** [December 25, 2015, 7:33pm UTC](https://community.letsencrypt.org/t/letsencrypt-auto-wont-see-the-apache-vhosts-anymore/4472/2 "2015-12-25T19:33:35Z")

</div>

Same thing for me, was rather painful. Solved it by doing it manually…

I don’t think it is the recommended way to do it, but what the hell, it works.

## stop apache

In order to avoid conflict with the standalone servern You have to stop apache. I told you this is not the recommended way.

Oh, yeah, and you might double check that ssl is on with `a2enmod ssl`

## generate certificates

```auto
/letsencrypt-auto certonly --standalone -d ryogasp.com -d www.ryogasp.com

```

## duplicate your website conf.

```auto
cd /etc/apache2/sites-available/
cp ryogasp.com.conf ryogasp.com-ssl.conf 

```

The important part of the message is the path of the cert chain:

```auto
IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at
   /etc/letsencrypt/live/ryogasp.com/fullchain.pem. 

```

## edit the `-ssl.conf` file

before it should look like this

```auto
<VirtualHost 46.105.17.17:80>
        ServerName ryogasp.com
        ServerAlias www.ryogasp.com
        DocumentRoot /home/hostinguser/ryogasp.com/www
        <Directory /home/hostinguser/ryogasp.com/www>
                Require all granted
                AllowOverride All
        </Directory>
        CustomLog /var/log/apache2/ryogasp.com.log combined
</VirtualHost>

```

make it look like that

```auto
<VirtualHost 46.105.17.17:443>
        ServerName ryogasp.com
        ServerAlias www.ryogasp.com
        DocumentRoot /home/hostinguser/ryogasp.com/www
        <Directory /home/hostinguser/ryogasp.com/www>
                Require all granted
                AllowOverride All
        </Directory>
        Include /etc/letsencrypt/options-ssl-apache.conf
        SSLCertificateFile /etc/letsencrypt/live/ryogasp.com/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/ryogasp.com/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/ryogasp.com/fullchain.pem
        CustomLog /var/log/apache2/ryogasp.com.log combined
</VirtualHost>

```

## Enable the vhost file

`a2ensite ryogasp.com-ssl`

## Start apache

`/etc/init.d/apache2 start`
