Apache 2.4 on Debian 8 - Letsencrypt client fails to detect VirtualHost


#1

I am running out of luck. When running

letsencrypt --apache -d mediawikiwidgets.org -d www.mediawikiwidgets.org

I get to the point that I have to select the VirutalHost for mediawikiwidgets.org. However my “www.mediawikiwidgets.org.conf” file is not detected. I only get to choose from “000-default.conf” and “default-ssl.conf”. Consequently the tool fails with

Failed authorization procedure. mediawikiwidgets.org (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Failed to connect to host for DVSNI challenge, www.mediawikiwidgets.org (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Failed to connect to host for DVSNI challenge followed by - The following errors were reported by the server:

Domain: mediawikiwidgets.org
Type: connection
Detail: Failed to connect to host for DVSNI challenge

Domain: www.mediawikiwidgets.org
Type: connection
Detail: Failed to connect to host for DVSNI challenge

I may note that “www.mediawikiwidgets.org.conf” contains “www.mediawikiwidgets.org” and “mediawikiwidgets.org” as server names.

Is there a way to force the tool showing all files in /etc/apache2/sites-available/ for me to do the challenge successfully. Is there another way to do pass the challenge.

Thanks for your time.


#2

Omg, it seems I forgot to enable mod_ssl :frowning:


#3

Does not change a thing. Whatever, there is also a config error in the VirtualHost.


#4

Yeah, no idea what is going on:

No vhost exists with servername or alias of: mediawikiwidgets.org. No vhost was selected. Please specify servernames in the Apache config


#5

Just to clarify, is this VirtualHost only available in /etc/apache2/sites-available, or also in /etc/apache2/sites-enabled? Not sure if the client looks at sites-available for that feature, since those sites aren’t actually enabled (which you can do with a2ensite).

If that doesn’t help - mind sharing www.mediawikiwidgets.org.conf?


#6

Yes, it is also at /etc/apache2/sites-enabled together with other VirtualHosts. The sites are actually up and running. This is the VirtualHost:

<VirtualHost *:80>
        ServerAdmin my@email.tld
        ServerName www.mediawikiwidgets.org

        DocumentRoot /var/www/htdocs/mw/02120/

...
</VirtualHost>
<VirtualHost *:80>
        ServerAdmin my@email.tld
        ServerName mediawikiwidgets.org

        RedirectPermanent / http://www.mediawikiwidgets.org/

...
</VirtualHost>
<VirtualHost *:443>
        ServerAdmin my@email.tld
        ServerName www.mediawikiwidgets.org
        ServerAlias mediawikiwidgets.org

        RedirectPermanent / http://www.mediawikiwidgets.org/
...
</VirtualHost>

#7

The client currently doesn’t support configurations with multiple VirtualHosts per file, see:


#8

Ouch, I actually read this but for an unknown reason I regarded the .conf file as one entity = one virtual host. This was a bit silly of me. So the bottom line is that I should create multiple files (up to four) for each website. Never done this but it should probably work. I will try. Thank you for pointing out to the obvious. Senior moments on my end. :expressionless:

I can understand that it probably will not be an easy task to implement this. Anyway thank you for your help! Much appreciated.


#9

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