I ran this command: certbot --apache -d sovet-mgd.ru -d www.sovet-mgd.ru
It produced this output:
- The following errors were reported by the server:
Domain: www.sovet-mgd.ru
Type: unauthorized
Detail: Invalid response from
http://www.sovet-mgd.ru/.well-known/acme-challenge/-LF6HPMIIb5LUcTCHGO-KZDcsNz6CDaX-IP8mykBk6I
[194.48.97.191]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"
Domain: sovet-mgd.ru
Type: unauthorized
Detail: Invalid response from
http://sovet-mgd.ru/.well-known/acme-challenge/j9waVqynBZzQS9JuoI3pQ-YuSXsXkthEUqzP1fDvpwA
[194.48.97.191]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
My web server is (include version): Apache/2.4.25 (Debian)
The operating system my web server runs on is (include version): Debian 9.5
My hosting provider, if applicable, is: 1cloud
I can login to a root shell on my machine (yes or no, or I don’t know): yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.28.0
VirtualHost configuration:
194.48.97.191:443 is a NameVirtualHost
default server a-tsm.ru (/etc/apache2/vhosts/a-tsm/a-tsm.ru:19)
port 443 namevhost a-tsm.ru (/etc/apache2/vhosts/a-tsm/a-tsm.ru:19)
alias b.a-tsm.ru
alias t.a-tsm.ru
alias www.a-tsm.ru
port 443 namevhost legalclp.com (/etc/apache2/vhosts/a-tsm/legalclp.com:22)
alias www.legalclp.com
port 443 namevhost niistandart.ru (/etc/apache2/vhosts/a-tsm/niistandart.ru:19)
alias nii.a-tsm.ru
alias www.niistandart.ru
port 443 namevhost sovet-mgd.ru (/etc/apache2/vhosts/a-tsm/sovet-mgd.ru:19)
alias www.sovet-mgd.ru
194.48.97.191:80 is a NameVirtualHost
default server a-tsm.ru (/etc/apache2/vhosts/a-tsm/a-tsm.ru:1)
port 80 namevhost a-tsm.ru (/etc/apache2/vhosts/a-tsm/a-tsm.ru:1)
alias b.a-tsm.ru
alias t.a-tsm.ru
alias www.a-tsm.ru
port 80 namevhost camarbitrale.it (/etc/apache2/vhosts/a-tsm/camarbitrale.it:1)
alias www.camarbitrale.it
port 80 namevhost de-arbitrage.de (/etc/apache2/vhosts/a-tsm/de-arbitrage.de:1)
alias www.de-arbitrage.de
port 80 namevhost interarbi.com (/etc/apache2/vhosts/a-tsm/interarbi.com:1)
alias www.interarbi.com
port 80 namevhost legalclp.com (/etc/apache2/vhosts/a-tsm/legalclp.com:1)
alias www.legalclp.com
port 80 namevhost niistandart.ru (/etc/apache2/vhosts/a-tsm/niistandart.ru:1)
alias nii.a-tsm.ru
alias www.niistandart.ru
port 80 namevhost rsa.sg (/etc/apache2/vhosts/a-tsm/rsa.sg:1)
alias www.rsa.sg
port 80 namevhost souz-u-t-s.ru (/etc/apache2/vhosts/a-tsm/souz-u-t-s.ru:1)
alias www.souz-u-t-s.ru
port 80 namevhost sovet-mgd.ru (/etc/apache2/vhosts/a-tsm/sovet-mgd.ru:1)
alias www.sovet-mgd.ru
port 80 namevhost ta-paris.fr (/etc/apache2/vhosts/a-tsm/ta-paris.fr:1)
alias www.ta-paris.fr
port 80 namevhost vesarbitrazh.ru (/etc/apache2/vhosts/a-tsm/vesarbitrazh.ru:1)
alias www.vesarbitrazh.ru
port 80 namevhost yantgorod-tsz.ru (/etc/apache2/vhosts/a-tsm/yantgorod-tsz.ru:1)
alias www.yantgorod-tsz.ru
*:80 a-tsm.ru (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENABLE_USR_LIB_CGI_BIN
User: name="www-data" id=33
Group: name="www-data" id=33
port 443 namevhost sovet-mgd.ru (/etc/apache2/vhosts/a-tsm/sovet-mgd.ru:19)
alias www.sovet-mgd.ru
port 80 namevhost sovet-mgd.ru (/etc/apache2/vhosts/a-tsm/sovet-mgd.ru:1)
alias www.sovet-mgd.ru
*:80 a-tsm.ru (/etc/apache2/sites-enabled/000-default.conf:1)
<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 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>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
[the formatting was off on that last post & I ran out of edits - I’ll go back and delete it ASAP]
I don’t see the confusion.
It is not clear to me why certbot fails to use: DocumentRoot /var/www/a-tsm/data/www/sovet-mgd.ru
But this is not a problem.
You have choices:
You can use --webroot to specify the location to be used: certbot --webroot -w /var/www/a-tsm/data/www/sovet-mgd.ru -d sovet-mgd.ru -d www.sovet-mgd.ru
[this solution will probably be required for your other sites too]
You can define a global alias that will affect all sites (present and future) to use a specific challenge location: Alias /.well-known/acme-challenge/ /some/path/you/like/
[I use: Alias /.well-known/acme-challenge/ /ACME-challenges/`]
[this will only require the one entry (in the main apache2.conf file) and the creation of that path]
[mkdir /some/path/you/like/]
You can use --standalone to have certbot use its’ own web server.
[this requires stopping your web service until validated - that affects all sites]
Thank you for your answers.
I must create new path, for example /root/path/ ?
And add this string Alias /.well-known/acme-challenge/ /root/path/
in end of file apache2.conf?
Am I right?
Thank you!
IncludeOptional sites-enabled/*.conf
#send all ACME challenges to this dedicated location
Alias /.well-known/acme-challenge/ /ACME-challenges/
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Hello, i did as you suggested, but now I have Forbidden error.
Domain: www.sovet-mgd.ru
Type: unauthorized
Detail: Invalid response from
http://www.sovet-mgd.ru/.well-known/acme-challenge/iJvif52pqXn8IoN4wejXdzgcIl7ZrR2JYEJSWN4B03g
[194.48.97.191]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>403
Forbidden</title>\n</head><body>\n<h1>Forbidden</h1>\n<p"
Domain: sovet-mgd.ru
Type: unauthorized
Detail: Invalid response from
http://sovet-mgd.ru/.well-known/acme-challenge/bSjESbJc__0duO3rC9kjTlXz6nWru3FK3n-5KQpBPn0
[194.48.97.191]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>403
Forbidden</title>\n</head><body>\n<h1>Forbidden</h1>\n<p"
ls -la /f2c/ACME-challenges/ -my path
total 8
drwxr-xr-x 2 root root 4096 Nov 21 13:43 .
drwxr-xr-x 3 root root 4096 Nov 21 13:43 .
Domain: www.sovet-mgd.ru
Type: unauthorized
Detail: Invalid response from
http://www.sovet-mgd.ru/.well-known/acme-challenge/NfD2cdP8V8kZzd03RzOh2bwZKjouIuTg4SJWnYzNZ1A
[194.48.97.191]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"
Domain: sovet-mgd.ru
Type: unauthorized
Detail: Invalid response from
http://sovet-mgd.ru/.well-known/acme-challenge/xhi6R_4hzAacF4GMTWqReVpKmeHSs9xg9nNShMT7QhE
[194.48.97.191]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
Is this right? certbot certonly --webroot --dry-run -w /f2c/acme-challenges/ -d sovet-mgd.ru -d www.sovet-mgd.ru
Domain: www.sovet-mgd.ru
Type: unauthorized
Detail: Invalid response from
http://www.sovet-mgd.ru/.well-known/acme-challenge/Rh-55ZmIKddceQrIW91InV89HgBJu2SFvayRJuIieBY
[194.48.97.191]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"