DVNSI host challenge fail on Debian 8.4 / Apache 2.4


#1

Hello,

I hope this hasn’t been answered before.

I try to setup a raspberry 2 for owncloud. I started with Raspbian Jessie Lite and installed owncloud 9 with apache. the server came with the owncloud dependecies.
I got LE from git. Then I tried to install the certs using sudo ./letsencrypt --apache
It fails with
Domain: timo.eagle-lair.com
Type: connection
Detail: Failed to connect to host for DVSNI challenge

my sites-enabled/000-default.conf looks like this:

VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        ServerName timo.eagle-lair.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/owncloud

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

ATM I don’t have a /var/www/html but only /var/www/owncloud. However, I setup /var/www/html/.well-known/acme-challenge/test123 changed the DocumentRoot accordingly and it was accessable from outside of my network (used my mobile to verify). What is strange is that, if I understand correctly, LE creates .well-known/acme-challenge/somefile to verify the server. Before I created it, there wasn’t even a .well-known/ Might LE for some reason not be able to create these files?


#2

Your getting the 2 main challenges mixed up, tls-sni-01 (DVSNI) uses a self signed cert ending in .acme.invalid while files under /.well-known/acme-challenge/ are used by http-01.
The most common cause of this problem is that apache is not listening on port 443 or it’s blocked by a firewall.


#3

Ok thanks for that fast reply. I’m pretty much a noob in all this and just want to setup that owncloud server.
How do I check if apache is listening on 443? That port is forwarded to the rpi in my router and I don’t have a firewall installed.


#4

This command will show which ports apache is listening on.

sudo netstat -tlp | grep apache

If it’s not listening on both ports then you may need to enable the default-ssl site.


#5

Seems it indeed only listens on 80

tcp6 0 0 [::]:http [::]:* LISTEN 806/apache2

I’m guessing this is done in sites-available/default-ssl.conf What do I have to do?


#6

Just run these 2 commands to enable the site and reload the apache config.

sudo a2ensite default-ssl.conf
sudo service apache2 reload

#7

Didn’t do it.

First one:

Enabling site default-ssl.
To activate the new configuration, you need to run:
  service apache2 reload

then reloaded apache, it still only listens on 80. also tried service apache restart and even rebooted just to make sure


#8

Ok I also had to do sudo a2enmod ssl. Now Apache listens on both http and https.

Still I get the same error message about the DVNSI challenge


#9

Turns out I forwarded 443 to the wrong computer in my router… Corrected it, now it works!

Thank you Mr cool110 =)


#10

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