Error getting validation data, Type connection

I am trying to make two of icecasts2 servers to be ssl. Icecast is, as you may know, an audio internet broadcasting server software system. When I tried to install listening plugin software onto WordPress, I knew that the broadcast server should also be ssl. So I am struggling to set them up. I am handling two servers now.
I am using two VPSs with debian, one other server for WordPress, and DNS, those services are provided by a Japanese provider named Conoha(conoha.jp).

My domain is:
ibcc.fun
https://a-trust.ibcc.fun:8000/stream/
https://kbc.ibcc.fun:8000/stream/

I ran this command:
letsencrypt certonly --domain a-trust.ibcc.fun --webroot --webroot-path /var/www/html
letsencrypt certonly --domain kbc.ibcc.fun --webroot --webroot-path /var/www/html

It produced this output:
for a-trust.ibcc.fun
IMPORTANT NOTES:

  • The following errors were reported by the server:
    Domain: a-trust.ibcc.fun
    Type: connection
    Detail: 157.7.207.219: Fetching
    https://a-trust.ibcc.fun/.well-known/acme-challenge/1NaoZwd-vx0QMvsIAO9mJQHgRt58NCy0VqoKe84Ban0:
    Error getting validation data

    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. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you're using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

for kbc.ibcc.fun
IMPORTANT NOTES:

  • The following errors were reported by the server:
    Domain: a-trust.ibcc.fun
    Type: connection
    Detail: 157.7.207.219: Fetching
    https://a-trust.ibcc.fun/.well-known/acme-challenge/1NaoZwd-vx0QMvsIAO9mJQHgRt58NCy0VqoKe84Ban0:
    Error getting validation data

    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. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you're using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

My web server is (include version):
Apache/2.4.56

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

My hosting provider, if applicable, is:
Conoha (conoha.jp)

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 1.12.0

Hint:

  1. the DNS A record(s) for that domain contain(s) the right IP address. you can check those addresses with the command “nsoutlook” from outside.

  2. no firewalls had been set on the servers

  3. the directory “acme-challenge” is chmod 777

  4. I could get icecast management page with http://a-trust.ibcc.fun:8000/admin/, and apache2 page with http://a-trust.ibcc.fun/
    So I could get with “kbc.ibcc.fun” as well.

  5. objectives are not getting ssl only on services by apache but also streaming by icecast. like “https://a-trust.ibcc.fun:8000/stream”.

  6. i had got the ssl installing process from Debian Wiki
    Icecast2 - Debian Wiki

I am trying to make two of icecasts2 servers to be ssl. Icecast is, as you may know, an audio internet broadcasting server software system. When I tried to install listening plugin software onto WordPress, I knew that the broadcast server should also be ssl. So I am struggling to set them up. I am handling two servers now.
I am using two VPSs with debian, one other server for WordPress, and DNS, those services are provided by a Japanese provider named Conoha(conoha.jp).

Apache is "speaking" HTTP on port 443 whereas that should be HTTPS.

2 Likes

Are these two separate servers?:

Name:    a-trust.ibcc.fun
Address: 157.7.207.219

Name:    kbc.ibcc.fun
Address: 157.7.193.93

Let's tackle them one at a time.

4 Likes

Hi guys,

I really appreciate your super-express and spontaneous response.I have been struggling with this problem for three full days until midnight, so your response shines like a god or an angel.

I am 75 years old, come from a telecommunications and broadcasting background, and am a person who desires cultural diversity. Internet broadcasting can turn 7.9 billion people into potential listeners with a small investment. I've used icecast in the past, but I'm experimenting with writing a textbook ("How to start a garage broadcast") on Kindle to spread it. It used to be easy without requiring ssl 15 years ago.

Mr. Osiris,

Apache is "speaking" HTTP on port 443 whereas that should be HTTPS.

→ Yes, it’s speaking by Icecast2 (https://icecast.org/).

I'm also vaguely skeptical about encrypting audio signals, but for three reasons I agreed.

  1. Use the WordPress plugin RadioPlayer (https://www.radioplayer.co.uk/) to create a screen for listening to the broadcast.

For the sake of working with the plugin, The broadcast server is also required to be ssl.

  1. If the technology develops, there may be a possibility of hacking that puts the protocol on the voice channel.

  2. Some articles on the web use ssl for icecast.

If I use the paid plan of the plug-in mentioned earlier, audio stream can be run without being ssl, but I would like to write in the textbook that it can be realized as cheaply as possible.

Mr. rg305

Are these two separate servers?:

Are these two servers separate?:

→ Yes, I bought two VPS. After some experience, I will combine them or add more, depending on the traffic.

We started two voice servers at the same time for two reasons.

  1. The community I belong to is a villa area that boasts one of Japan's most beautiful natural environments. One of my clients, a conservation non-profit organization, wants to start broadcasting as soon as possible. (a-trust)

I also want to create an experimental station for my own purposes. (kbc)

  1. Doing both at the same time is cumbersome, but I thought it would be easier to find careless mistakes. If you get different results, then one of my settings must be wrong.

If you need, I can attach the setting of the DNS. I firstly doute settings of DNS or DNS functions of my provider, Conoha. So I deleted all of the settings and rewrote everything on it again. But the results were the same.

→ YES “Let's tackle them one at a time.”

Thanks for your cooperation.

I have been involved in the data network business, including the Internet, for over 40 years.

Around 1980, the OSS (Open Source Software) culture began with LINUX as far as I understand. I've faced many OSS around Debian, Asterisk (IP telephony exchange system), Icecast and those big guys.,,,Chat-GPT,,,

Such a situation is the first one faced in the history of mankind. I feel very lucky to have met someone like you who are from the other side of earth. Who would have ever thought a 75 year old fucking old man could support a community with his engineering?

Thanks in advance.

2023年4月12日(水) 4:29 Rudy Gomez via Let's Encrypt Community Support <notifications@letsencrypt.discoursemail.com>:

1 Like

It looks like Apache 2.4.56, and the use of HTTP, instead of HTTPS, on port 443 is an apparent misconfiguration which is causing the validation to fail.

Can you share your Apache configuration here?

4 Likes

Mr. schoen,

Thank you for giving me your contact.

I found that apache were 2.4.56 on both VPSs.
root@157-7-207-219:/usr/lib/tmpfiles.d# apache2 -version
Server version: Apache/2.4.56 (Debian)

I could not find “httpd.conf” on both VPSs.
root@157-7-207-219:/usr/lib/tmpfiles.d# find / -name httpd.conf
root@157-7-207-219:/usr/lib/tmpfiles.d#

I found “apache2.conf” on both VPSs.
root@157-7-207-219:/usr/lib/tmpfiles.d# find / -name apache2.conf
/etc/apache2/apache2.conf

This is apache2.conf except comments
—------------------from here—---------------

DefaultRuntimeDir ${APACHE_RUN_DIR}
#
apache2.conf
#
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
#
<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>
<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>
<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
#
AccessFileName .htaccess
#
<FilesMatch "^\.ht">
        Require all denied
</FilesMatch>
#
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

—-------------------end here—------------------

Thank you.
Shee

When sharing configuration file contents or console output, it is helpful to place three backticks on the line before and after the details. It makes them much easier to read.

Type this:
```
Your
Config
Here
```

To get this:

Your
Config
Here

You won't find that file on Debian. It's a name used by Red Hat based distributions for the file that Debian names apache2.conf. Monolithic Apache configs have become a thing of the past. Modern configuration relies on many files under the /etc/apache2/ directory. You will find symlinks in the [conf|mods|sites]-enabled folders that point to files in the [conf|mods|sites]-available folders.

You can also use apache2ctl -D DUMP_VHOSTS to create a compiled configuration to review.

5 Likes

This line would include more files:
[normally where the vhost configuration files are stored]

5 Likes

Dear Everybody,

Thank you for your guidance.

I downloaded the conf files that seem to be relevant. I can't know what was missing, nor what was wrong, with my abilities. Please give me advice.

There are many conf files, but I will attach them below.

root@157-7-207-219:/etc/apache2# ls -al
total 88
drwxr-xr-x  8 root root  4096 Apr 13 20:00 .
drwxr-xr-x 76 root root  4096 Apr 11 09:07 ..
-rw-r--r--  1 root root  7224 Mar  8 12:05 apache2.conf
drwxr-xr-x  2 root root  4096 Apr  9 14:57 conf-available
drwxr-xr-x  2 root root  4096 Apr  9 14:57 conf-enabled
-rw-r--r--  1 root root  1782 Jun  9  2022 envvars
-rw-r--r--  1 root root 31063 Jun  9  2022 magic
drwxr-xr-x  2 root root 12288 Apr  9 14:57 mods-available
drwxr-xr-x  2 root root  4096 Apr  9 18:15 mods-enabled
-rw-r--r--  1 root root   320 Mar  8 12:04 ports.conf
drwxr-xr-x  2 root root  4096 Apr 11 12:49 sites-available
drwxr-xr-x  2 root root  4096 Apr 11 12:51 sites-enabled
—------------------------------------apache2.conf—--------
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.
# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#       /etc/apache2/
#       |-- apache2.conf
#       |       `--  ports.conf
#       |-- mods-enabled
#       |       |-- *.load
#       |       `-- *.conf
#       |-- conf-enabled
#       |       `-- *.conf
#       `-- sites-enabled
#               `-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.
# Global configuration
#
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"
#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#Mutex file:${APACHE_LOCK_DIR} default
#
# The directory where shm and other runtime files will be stored.
#
DefaultRuntimeDir ${APACHE_RUN_DIR}
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5
# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log
#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn
# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
# Include list of ports to listen on
Include ports.conf
# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>
<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>
<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

#<Directory /srv/>
#       Options Indexes FollowSymLinks
#       AllowOverride None
#       Require all granted
#</Directory>
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
        Require all denied
</FilesMatch>
#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
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
# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.
# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
root@157-7-207-219:/etc/apache2/conf-available# ls -al

total 28

drwxr-xr-x 2 root root 4096 Apr 9 14:57 .

drwxr-xr-x 8 root root 4096 Apr 13 20:03 ..

-rw-r--r-- 1 root root 315 Mar 8 12:04 charset.conf

-rw-r--r-- 1 root root 3224 Mar 8 12:04 localized-error-pages.conf

-rw-r--r-- 1 root root 189 Mar 8 12:04 other-vhosts-access-log.conf

-rw-r--r-- 1 root root 2174 Mar 8 12:04 security.conf

-rw-r--r-- 1 root root 455 Mar 8 12:04 serve-cgi-bin.conf

—----------------------------------security.conf—

#

# Disable access to the entire file system except for the directories that

# are explicitly allowed later.

#

# This currently breaks the configurations that come with some web application

# Debian packages.

#

#<Directory />

# AllowOverride None

# Require all denied

#</Directory>

# Changing the following options will not really affect the security of the

# server, but might make attacks slightly more difficult in some cases.

#

# ServerTokens

# This directive configures what you return as the Server HTTP response

# Header. The default is 'Full' which sends information about the OS-Type

# and compiled in modules.

# Set to one of: Full | OS | Minimal | Minor | Major | Prod

# where Full conveys the most information, and Prod the least.

#ServerTokens Minimal

ServerTokens OS

#ServerTokens Full

#

# Optionally add a line containing the server version and virtual host

# name to server-generated pages (internal error documents, FTP directory

# listings, mod_status and mod_info output etc., but not CGI generated

# documents or custom error documents).

# Set to "EMail" to also include a mailto: link to the ServerAdmin.

# Set to one of: On | Off | EMail

#ServerSignature Off

ServerSignature On

#

# Allow TRACE method

#

# Set to "extended" to also reflect the request body (only for testing and

# diagnostic purposes).

#

# Set to one of: On | Off | extended

TraceEnable Off

#TraceEnable On

#

# Forbid access to version control directories

#

# If you use version control systems in your document root, you should

# probably deny access to their directories. For example, for subversion:

#

#<DirectoryMatch "/\.svn">

# Require all denied

#</DirectoryMatch>

#

# Setting this header will prevent MSIE from interpreting files as something

# else than declared by the content type in the HTTP headers.

# Requires mod_headers to be enabled.

#

#Header set X-Content-Type-Options: "nosniff"

#

# Setting this header will prevent other sites from embedding pages from this

# site as frames. This defends against clickjacking attacks.

# Requires mod_headers to be enabled.

#

#Header set X-Frame-Options: "sameorigin"

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
root@157-7-207-219:/# apache2ctl -D DUMP_VHOSTS
AH00557: apache2: apr_sockaddr_info_get() failed for 157-7-207-219
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:443                  a-trust.ibcc.fun (/etc/apache2/sites-enabled/a-trust.ibcc.fun.conf:1)
*:80                   is a NameVirtualHost
         default server 127.0.0.1 (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost 127.0.0.1 (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost a-trust.ibcc.fun (/etc/apache2/sites-enabled/a-trust.ibcc.fun.conf:28)
root@157-7-207-219:/# 
—------------------------------------------
root@157-7-207-219:/etc/apache2/sites-enabled# ls -al
total 8
drwxr-xr-x 2 root root 4096 Apr 11 12:51 .
drwxr-xr-x 8 root root 4096 Apr 13 20:24 ..
lrwxrwxrwx 1 root root   35 Apr  9 14:57 000-default.conf -> ../sites-available/000-default.conf
lrwxrwxrwx 1 root root   31 Apr  9 18:13 a-trust.conf -> ../sites-available/a-trust.conf
lrwxrwxrwx 1 root root   40 Apr 11 12:51 a-trust.ibcc.fun.conf -> ../sites-available/a-trust.ibcc.fun.conf

root@157-7-207-219:/etc/apache2/sites-enabled# cd /etc/apache2/sites-available
root@157-7-207-219:/etc/apache2/sites-available# ls -al
total 24
drwxr-xr-x 2 root root 4096 Apr 11 12:49 .
drwxr-xr-x 8 root root 4096 Apr 13 20:24 ..
-rw-r--r-- 1 root root 1332 Mar  8 12:04 000-default.conf
-rw-r--r-- 1 root root  950 Apr 10 13:44 a-trust.ibcc.fun.conf
-rw-r--r-- 1 root root 6338 Mar  8 12:04 default-ssl.conf
root@157-7-207-219:/etc/apache2/sites-available# 

there was no “a-trust.conf” in this directory. there was “default-ssl.conf” instead.
—--------------------------------000-default.conf—-----
<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

—----------------------------a-trust.ibcc.fun.conf—-
<virtualhost *:443>
  ServerName a-trust.ibcc.fun
  # this path is unuseful and used only for Let's Encrypt's temporary files during the renewal process
  DocumentRoot /var/www/html
  # send all traffic to Icecast in plaintext
  <Location "/">
    ProxyPass        http://localhost:8000/
    ProxyPassReverse http://localhost:8000/
  </Location>
  # these files are served from /var/www/html to serve Let's Encrypt temporary files
  <Location "/.well-known/acme-challenge">
    ProxyPass !
  </Location>
  <IfFile /etc/letsencrypt/live/a-trust.ibcc.fun/cert.pem>
    SSLEngine on
    SSLCertificateFile      /etc/letsencrypt/live/a-trust.ibcc.fun/cert.pem
    SSLCertificateKeyFile   /etc/letsencrypt/live/a-trust.ibcc.fun/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/a-trust.ibcc.fun/chain.pem
  </IfFile>
</virtualhost>
<VirtualHost *:80>
  ServerName a-trust.ibcc.fun
  Redirect / https://a-trust.ibcc.fun/
</VirtualHost>

—-----------------------------default.conf—
<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                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
                #   SSL Engine Switch:
                #   Enable/Disable SSL for this virtual host.
                SSLEngine on
                #   A self-signed (snakeoil) certificate can be created by installing
                #   the ssl-cert package. See
                #   /usr/share/doc/apache2/README.Debian.gz for more info.
                #   If both key and certificate are stored in the same file, only the
                #   SSLCertificateFile directive is needed.
                SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
                SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
                #   Server Certificate Chain:
                #   Point SSLCertificateChainFile at a file containing the
                #   concatenation of PEM encoded CA certificates which form the
                #   certificate chain for the server certificate. Alternatively
                #   the referenced file can be the same as SSLCertificateFile
                #   when the CA certificates are directly appended to the server
                #   certificate for convinience.
                #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
                #   Certificate Authority (CA):
                #   Set the CA certificate verification path where to find CA
                #   certificates for client authentication or alternatively one
                #   huge file containing all of them (file must be PEM encoded)
                #   Note: Inside SSLCACertificatePath you need hash symlinks
                #                to point to the certificate files. Use the provided
                #                Makefile to update the hash symlinks after changes.
                #SSLCACertificatePath /etc/ssl/certs/
                #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
                #   Certificate Revocation Lists (CRL):
                #   Set the CA revocation path where to find CA CRLs for client
                #   authentication or alternatively one huge file containing all
                #   of them (file must be PEM encoded)
                #   Note: Inside SSLCARevocationPath you need hash symlinks
                #                to point to the certificate files. Use the provided
                #                Makefile to update the hash symlinks after changes.
                #SSLCARevocationPath /etc/apache2/ssl.crl/
                #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
                #   Client Authentication (Type):
                #   Client certificate verification type and depth.  Types are
                #   none, optional, require and optional_no_ca.  Depth is a
                #   number which specifies how deeply to verify the certificate
                #   issuer chain before deciding the certificate is not valid.
                #SSLVerifyClient require
                #SSLVerifyDepth  10
                #   SSL Engine Options:
                #   Set various options for the SSL engine.
                #   o FakeBasicAuth:
                #        Translate the client X.509 into a Basic Authorisation.  This means that
                #        the standard Auth/DBMAuth methods can be used for access control.  The
                #        user name is the `one line' version of the client's X.509 certificate.
                #        Note that no password is obtained from the user. Every entry in the user
                #        file needs this password: `xxj31ZMTZzkVA'.
                #   o ExportCertData:
                #        This exports two additional environment variables: SSL_CLIENT_CERT and
                #        SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
                #        server (always existing) and the client (only existing when client
                #        authentication is used). This can be used to import the certificates
                #        into CGI scripts.
                #   o StdEnvVars:
                #        This exports the standard SSL/TLS related `SSL_*' environment variables.
                #        Per default this exportation is switched off for performance reasons,
                #        because the extraction step is an expensive operation and is usually
                #        useless for serving static content. So one usually enables the
                #        exportation for CGI and SSI requests only.
                #   o OptRenegotiate:
                #        This enables optimized SSL connection renegotiation handling when SSL
                #        directives are used in per-directory context.
                #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
                <FilesMatch "\.(cgi|shtml|phtml|php)$">
                                SSLOptions +StdEnvVars
                </FilesMatch>
                <Directory /usr/lib/cgi-bin>
                                SSLOptions +StdEnvVars
                </Directory>

                #   SSL Protocol Adjustments:
                #   The safe and default but still SSL/TLS standard compliant shutdown
                #   approach is that mod_ssl sends the close notify alert but doesn't wait for
                #   the close notify alert from client. When you need a different shutdown
                #   approach you can use one of the following variables:
                #   o ssl-unclean-shutdown:
                #        This forces an unclean shutdown when the connection is closed, i.e. no
                #        SSL close notify alert is send or allowed to received.  This violates
                #        the SSL/TLS standard but is needed for some brain-dead browsers. Use
                #        this when you receive I/O errors because of the standard approach where
                #        mod_ssl sends the close notify alert.
                #   o ssl-accurate-shutdown:
                #        This forces an accurate shutdown when the connection is closed, i.e. a
                #        SSL close notify alert is send and mod_ssl waits for the close notify
                #        alert of the client. This is 100% SSL/TLS standard compliant, but in
                #        practice often causes hanging connections with brain-dead browsers. Use
                #        this only for browsers where you know that their SSL implementation
                #        works correctly.
                #   Notice: Most problems of broken clients are also related to the HTTP
                #   keep-alive facility, so you usually additionally want to disable
                #   keep-alive for those clients, too. Use variable "nokeepalive" for this.
                #   Similarly, one has to force some clients to use HTTP/1.0 to workaround
                #   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
                #   "force-response-1.0" for this.
                # BrowserMatch "MSIE [2-6]" \
                #               nokeepalive ssl-unclean-shutdown \
                #               downgrade-1.0 force-response-1.0
        </VirtualHost>
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Thank you.
Shee

2 Likes

Please put three 'backticks' (```) above and below the configuration file you've just pasted for better readability.

3 Likes

Mr. Osiris,

I was so sorry didn't know the meaning of "backticks".
So sorry.
Thank you.

Shee

2 Likes

Let's review file:

2 Likes

There is no HTTP vhost that specifically covers that name:

4 Likes

Look like HTTP being served on Port 443 instead of HTTPS being served

$ curl -k -Ii https://a-trust.ibcc.fun/.well-known/acme-challenge/1NaoZwd-vx0QMvsIAO9mJQHgRt58NCy0VqoKe84Ban0
curl: (35) error:0A00010B:SSL routines::wrong version number
$ curl -k -Ii http://a-trust.ibcc.fun:443/.well-known/acme-challenge/1NaoZwd-vx0QMvsIAO9mJQHgRt58NCy0VqoKe84Ban0
HTTP/1.1 404 Not Found
Date: Thu, 13 Apr 2023 18:44:39 GMT
Server: Apache/2.4.56 (Debian)
Content-Type: text/html; charset=iso-8859-1
2 Likes

Dear Mr.rg305,
Sorry, I run 2 virtual hosts for 2 URLs. One is "a-trust.ibcc.fun 157.7.207.219 "and the other is "kbc.ibcc.fun 157.7.193.93".
Below are two results from each "D DUMP" for each host.

root@157-7-207-219:~# apache2ctl -D DUMP_VHOSTS
AH00557: apache2: apr_sockaddr_info_get() failed for 157-7-207-219
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:443                  a-trust.ibcc.fun (/etc/apache2/sites-enabled/a-trust.ibcc.fun.conf:1)
*:80                   is a NameVirtualHost
         default server 127.0.0.1 (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost 127.0.0.1 (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost a-trust.ibcc.fun (/etc/apache2/sites-enabled/a-trust.ibcc.fun.conf:28)
root@157-7-207-219:~# 
root@157-7-193-93:~# apache2ctl -D DUMP_VHOSTS
AH00557: apache2: apr_sockaddr_info_get() failed for 157-7-193-93
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:443                  kbc.ibcc.fun (/etc/apache2/sites-enabled/kbc.ibcc.fun.conf:1)
*:80                   is a NameVirtualHost
         default server 127.0.0.1 (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost 127.0.0.1 (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost kbc.ibcc.fun (/etc/apache2/sites-enabled/kbc.ibcc.fun.conf:28)
root@157-7-193-93:~# ```

Thank you Mr.Bruce,
Two virtual servers in the network, a-trust.ibcc.fun, and kbc.ibcc.fun, are servers for icecast broadcasting. Each of management page can be open with “http:domain_name:8000/admin”, those are working well. and Each of server are working well for audio streaming with “http:domain_name:8000/stream”. But all of those are not working with https.

At those two servers, the command " letsencrypt certonly --domain domain_name --webroot --webroot-path /var/www/" did not done yet without error.

thank you.

2 Likes

Please show these files:

3 Likes

Thank you. Mr. rg305,

<virtualhost *:443>

  ServerName a-trust.ibcc.fun

  # this path is unuseful and used only for Let's Encrypt's temporary files during the renewal process
  DocumentRoot /var/www/html

  # send all traffic to Icecast in plaintext
  <Location "/">
    ProxyPass        http://localhost:8000/
    ProxyPassReverse http://localhost:8000/
  </Location>

  # these files are served from /var/www/html to serve Let's Encrypt temporary files
  <Location "/.well-known/acme-challenge">
    ProxyPass !
  </Location>

  <IfFile /etc/letsencrypt/live/a-trust.ibcc.fun/cert.pem>
    SSLEngine on
    SSLCertificateFile      /etc/letsencrypt/live/a-trust.ibcc.fun/cert.pem
    SSLCertificateKeyFile   /etc/letsencrypt/live/a-trust.ibcc.fun/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/a-trust.ibcc.fun/chain.pem
  </IfFile>

</virtualhost>

<VirtualHost *:80>
  ServerName a-trust.ibcc.fun

  Redirect / https://a-trust.ibcc.fun/
</VirtualHost>
<virtualhost *:443>
  ServerName kbc.ibcc.fun
  # this path is unuseful and used only for Let's Encrypt's temporary files during the renewal process
  DocumentRoot /var/www/html
  # send all traffic to Icecast in plaintext
  <Location "/">
    ProxyPass        http://localhost:8000/
    ProxyPassReverse http://localhost:8000/
  </Location>
  # these files are served from /var/www/html to serve Let's Encrypt temporary files
  <Location "/.well-known/acme-challenge">
    ProxyPass !
  </Location>
  <IfFile /etc/letsencrypt/live/kbc.ibcc.fun/cert.pem>
    SSLEngine on
    SSLCertificateFile      /etc/letsencrypt/live/kbc.ibcc.fun/cert.pem
    SSLCertificateKeyFile   /etc/letsencrypt/live/kbc.ibcc.fun/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/kbc.ibcc.fun/chain.pem
  </IfFile>
</virtualhost>
<VirtualHost *:80>
  ServerName kbc.ibcc.fun
  Redirect / https://kbc.ibcc.fun/
</VirtualHost>

The HTTP server blocks redirect to HTTPS.
The HTTPS server blocks exclude the ACME challenge requests from bieng proxied.
But there is no document root provided for the ACME requests to be served from.

2 Likes

Is what you point out means to add lins in <Location “/”>?

ProxyPass        https://localhost:8000/
ProxyPassReverse https://localhost:8000/
ProxyPass        https://localhost:443/
ProxyPassReverse https://localhost:443/