Unable to get SSL certificate

Hello!
My Domain: gangga-development.ru
The operating system my web server is running on Ubuntu 22.04
certbot 1.21.0
When trying to get an ssl certificate

certbot --apache

The following error is thrown:

Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: gangga-development.ru
Type: unauthorized
Detail: 2a00:f940:2:2:1:1:0:183: Invalid response from https://gangga-development.ru:443/.well-known/acme-challenge/SYUrKew9XgU6NhvFEhnRPIo72MlkcDCPvh1KWEXyGgU: 404

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.

Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

Where does the https error come from? Should be http.
This is most likely a bug, as I understand it?
I can't find a redirect to https anywhere on the server itself.

cat /etc/apache2/apache2.conf | egrep -v '^#|^$'

DefaultRuntimeDir ${APACHE_RUN_DIR}
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/.load
IncludeOptional mods-enabled/
.conf
Include ports.conf

Options FollowSymLinks
AllowOverride None
Require all denied

<Directory /usr/share>
AllowOverride None
Require all granted

<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted

AccessFileName .htaccess
<FilesMatch "^.ht">
Require all denied

LogFormat "%v:%p %h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" vhost_combined
LogFormat "%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/.conf
IncludeOptional sites-enabled/
.conf

cat /etc/apache2/sites-enabled/ | egrep -v '^#|^$'^C*

ServerAdmin webmaster@localhost
            DocumentRoot /var/www/html

            <FilesMatch "\.(cgi|shtml|phtml|php)$">
                            SSLOptions +StdEnvVars
            </FilesMatch>
            <Directory /usr/lib/cgi-bin>
                            SSLOptions +StdEnvVars
            </Directory>


    </VirtualHost>
    ServerAdmin webmaster@localhost
    ServerName gangga-development.store
    ServerAlias www.gangga-development.store
    DocumentRoot /var/www/html/gangga-development.store/


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

<Directory /var/www/html/gangga-development.store/>
Options Indexes FollowSymLinks
AllowOverride All

SSLCertificateFile /etc/letsencrypt/live/gangga-development.store/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/gangga-development.store/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf


<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    ServerName gangga-development.store
    DocumentRoot /var/www/html/gangga-development.store/



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

<Directory /var/www/html/gangga-development.store/>
Options Indexes FollowSymLinks
AllowOverride All

RewriteEngine on
RewriteCond %{SERVER_NAME} =gangga-development.store

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    ServerName gangga-development.ru
    DocumentRoot /var/www/html/gangga-development.ru/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /var/www/html/gangga-development.ru/>
Options Indexes FollowSymLinks
AllowOverride All

Help please!

Yes, ideally would be HTTP. Notice also the IPv6 address in the URL. You have both an IPv4 and an IPv6 address in your DNS but they get different responses (probably because they point to different servers). You should review your DNS to ensure they are all correct

4 Likes

I see an IPv6 address in the request:

I see no IPv6 binding/listen:

2 Likes

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