No vhost exists with servername or alias of

Hello!

I’ve got my expiration notice today and since renew didn’t go smooth the last time (#11097), I want to solve this error once and for all: No vhost exists with servername or alias of …

So my server is running Ubuntu 14.04 LTS, the apache configuration files are located in /etc/apache2/sites-available/, but only configurations under /etc/apache2/sites-enabled/ are active - so sites-enabled basically contains symlinks to files in sites-available. Following my apache2ctl -t -D DUMP_VHOSTS:output:

[Sun May 08 22:46:00.948076 2016] [so:warn] [pid 19314] AH01574: module passenger_module is already loaded, skipping VirtualHost configuration: *:80 is a NameVirtualHost default server k002867vsa.ipax.at (/etc/apache2/sites-enabled/000-default.conf:1) port 80 namevhost k002867vsa.ipax.at (/etc/apache2/sites-enabled/000-default.conf:1) port 80 namevhost fagschlunger.co.at (/etc/apache2/sites-enabled/000-default.conf:36) alias www.fagschlunger.co.at port 80 namevhost ipsa.at (/etc/apache2/sites-enabled/000-default.conf:50) alias www.ipsa.at port 80 namevhost krabbelmine.at (/etc/apache2/sites-enabled/000-default.conf:63) alias www.krabbelmine.at *:443 is a NameVirtualHost default server k002867vsa.ipax.at (/etc/apache2/sites-enabled/default-ssl.conf:2) port 443 namevhost k002867vsa.ipax.at (/etc/apache2/sites-enabled/default-ssl.conf:2) port 443 namevhost fagschlunger.co.at (/etc/apache2/sites-enabled/default-ssl.conf:134) alias www.fagschlunger.co.at port 443 namevhost ipsa.at (/etc/apache2/sites-enabled/default-ssl.conf:184) alias www.ipsa.at port 443 namevhost krabbelmine.at (/etc/apache2/sites-enabled/default-ssl.conf:205) alias www.krabbelmine.at
Since I’m not allowed to upload attachments, find the letencrypt.log under the following link:

https://fagschlunger.co.at/files/letsencrypt.log

So does anyone know why letsencrypt doesn’t find my VHosts?

2016-05-08 20:32:33,594:ERROR:letsencrypt_apache.configurator:No vhost exists with servername or alias of: fagschlunger.co.at. No vhost was selected. Please specify servernames in the Apache config

WIth best regards,
Andreas Fagschlunger

Based on your apache2ctl output, it looks like you might have multiple <VirtualHost> tags in the same .conf file. The client currently expects only one per file. There’s an issue for this problem:

For now, you could either split your .conf files so that you only have a single <VirtualHost> each, or use something other than the apache plugin (e.g. --webroot) while doing the SSL configuration manually.

Hello @pfg!

This was exactly the problem, I splitted up the VHosts in multiple files and letsencrypt just renewed my certs.

Best regards,
Andreas Fagschlunger

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