Certbot is throwing an error 404, cant grasp it

Detail: Invalid response from http://ddghhome.net/.well-known/acme-challenge/-5WSqH93tN1Ku6H12c3oUBHv-wQVT1peaFkk_44LyQ8 [77.169.3.56]: "\n\n404 Not Found\n\n

Not Found

\n<p"
-bash: !DOCTYPE: event not found

I am getting this message and I can't fix it. I'm on debian10 in domoticz and trying to get external acces. The web router is working fine for all internal stuf

hjz@Domoticz:~$ sudo netstat -napt
[sudo] password for hjz:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 489/sshd
tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN 688/node
tcp 0 0 127.0.0.1:59414 127.0.0.1:3000 TIME_WAIT -
tcp 0 0 192.168.2.10:33844 139.15.227.109:5222 ESTABLISHED 688/node
tcp 0 0 127.0.0.1:59402 127.0.0.1:3000 TIME_WAIT -
tcp 0 0 127.0.0.1:59404 127.0.0.1:3000 TIME_WAIT -
tcp 0 0 127.0.0.1:59400 127.0.0.1:3000 TIME_WAIT -
tcp 0 272 192.168.2.10:22 192.168.2.2:49860 ESTABLISHED 1081/sshd: hjz [pri
tcp 0 0 127.0.0.1:59412 127.0.0.1:3000 TIME_WAIT -
tcp 0 0 192.168.2.10:46554 192.168.2.1:22 ESTABLISHED 10880/domoticz
tcp 0 0 127.0.0.1:59410 127.0.0.1:3000 TIME_WAIT -
tcp6 0 0 :::8080 :::* LISTEN 10880/domoticz
tcp6 0 0 :::80 :::* LISTEN 26965/apache2
tcp6 0 0 :::22 :::* LISTEN 489/sshd
tcp6 0 0 :::443 :::* LISTEN 10880/domoticz
tcp6 0 0 :::6144 :::* LISTEN 10880/domoticz
tcp6 0 0 192.168.2.10:8080 192.168.2.2:61811 ESTABLISHED 10880/domoticz
tcp6 0 0 192.168.2.10:8080 192.168.2.2:53339 ESTABLISHED 10880/domoticz

I see that all other ports than 80 are watched by domoticz, and 80 is watched by apache2

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:

It produced this output:

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):

2 Likes

I'm running domoticz on a Intel Nuc.

I'm running " sudo certbot certonly --webroot --email h.j.zwiers@hetnet.nl -d ddghhome.net -w /home/hjz/domoticz/www/ "

I'm running on debian10

certbot 1.22.0

Can you show result of:

sudo apachectl -S
2 Likes

hjz@Domoticz:~$ sudo apachectl -S
[sudo] password for hjz:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80 127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:2)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33

Can you show the contents of that file? Please put three backticks before and after the output to format it. Like:
```
output
```

1 Like

This is the full content:

<VirtualHost *:80>

        # Redirect all requests to the local Apache server to port 8080
        # RewriteRule ^.*$ http://%{HTTP_HOST}:8080%{REQUEST_URI}

        # 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 www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # 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>

Hmm. I don't think that is the whole conf file but from what I see the -w folder in your certbot command should be the /var/www/html value from above statement.

2 Likes

I can change it to correspond? to/ home/hjz/domoticz/www/

You decide how to setup your server DocumentRoot. But, the -w folder should match what you choose to set it to.

2 Likes

Changed it to /home/hjz same result
Changed it to /home/hjz/domoticz/www

Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: ddghhome.net
Type: unauthorized
Detail: Invalid response from http://ddghhome.net/.well-known/acme-challenge/lv2uVFLkx-RhE32kgMC_jQFIlVgM6Tz1WaMX0tjctAw [77.169.3.56]: "\n\n404 Not Found\n\n

Not Found

\n<p"

Are you restarting Apache after these changes?

2 Likes

I forgot .... restarted

I received an error but its different

[Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems: Domain: ddghhome.net Type: unauthorized Detail: Invalid response from http://ddghhome.net/.well-known/acme-challenge/qvjBVaQW1zA4gR6j7D3UG0-PXIkslT16ojdQxqVEnWs [77.169.3.56]: "\n\n403 Forbidden\n\n

Forbidden

\n<p"](Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems: Domain: ddghhome.net Type: unauthorized Detail: Invalid response from http://ddghhome.net/.well-known/acme-challenge/qvjBVaQW1zA4gR6j7D3UG0-PXIkslT16ojdQxqVEnWs [77.169.3.56]: "\n\n403 Forbidden\n\n

Forbidden

\n<p")

OK, what is the DocumentRoot folder you are using now?

2 Likes

The root is

root@Domoticz:~#

I running domoticz from

hjz@Domoticz:~$ (/home/hjz/domoticz)

and the file in the previous file was from /home/hjz/domoticz/www

What is the value of the DocumentRoot setting in your Apache config

2 Likes

I checked apache2.conf and there is no DocumentRoot specified ......