Can't generate certonly in apache

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: hml-speedtest.globe.com.ph

I ran this command: certbot certonly --apache

It produced this output: Saving debug log to /var/log/letsencrypt/letsencrypt.log
An unexpected error occurred:
augeas.AugeasValueError: Augeas.get() failed: Too many matches for path expression: There are 2 nodes matching /files/etc/httpd/conf/httpd.conf/directive[22]/arg
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.

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

The operating system my web server runs on is (include version): Red Hat Enterprise Linux Server release 7.9 (Maipo)

My hosting provider, if applicable, is: N/A
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 2.6.0

Looks like Augeas, the library Certbot uses to parse the Apache configuration file(s), doesn't like one of your Apaches configuration file.

Please check the contents of /etc/httpd/conf/httpd.conf, especially on line 22.

1 Like

Hi Osiris please refer below. I don't see the "There are 2 nodes matching" in line 22 kindly help. thanks.

1 # This is the main Apache HTTP server configuration file. It contains the
2 # configuration directives that give the server its instructions.
3 # See URL:http://httpd.apache.org/docs/2.4/ for detailed information.
4 # In particular, see
5 # URL:http://httpd.apache.org/docs/2.4/mod/directives.html
6 # for a discussion of each configuration directive.
7 #
8 # Do NOT simply read the instructions in here without understanding
9 # what they do. They're here only as hints or reminders. If you are unsure
10 # consult the online docs. You have been warned.
11 #
12 # Configuration and logfile names: If the filenames you specify for many
13 # of the server's control files begin with "/" (or "drive:/" for Win32), the
14 # server will use that explicit path. If the filenames do not begin
15 # with "/", the value of ServerRoot is prepended -- so 'log/access_log'
16 # with ServerRoot set to '/www' will be interpreted by the
17 # server as '/www/log/access_log', where as '/log/access_log' will be
18 # interpreted as '/log/access_log'.
19
20 #
21 # ServerRoot: The top of the directory tree under which the server's
22 # configuration, error, and log files are kept.
23 #
24 # Do not add a slash at the end of the directory path. If you point
25 # ServerRoot at a non-local disk, be sure to specify a local disk on the
26 # Mutex directive, if file-based mutexes are used. If you wish to share the
27 # same ServerRoot for multiple httpd daemons, you will need to change at
28 # least PidFile.
29 #
30 ServerRoot "/etc/httpd"
31 ServerTokens ProductOnly
32 ServerSignature Off
33 Header always set X-Content-Type-Options nosniff
34 Header always set X-XSS-Protection "1; mode=block"
35 Header always set X-Frame-Options Deny
36 Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains
37
38 #
39 # Listen: Allows you to bind Apache to specific IP addresses and/or
40 # ports, instead of the default. See also the
41 # directive.
42 #
43 # Change this to Listen on specific IP addresses as shown below to
44 # prevent Apache from glomming onto all bound IP addresses.
45 #

The comments might be ignored in the "22" counter and I'm thinking there's more to the file than just these 45 lines. Can you provide the entire file?

1 Like

Hi Osirs, below are the entirety of it. Thanks.

1	# This is the main Apache HTTP server configuration file.  It contains the
     2	# configuration directives that give the server its instructions.
     3	# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
     4	# In particular, see
     5	# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
     6	# for a discussion of each configuration directive.
     7	#
     8	# Do NOT simply read the instructions in here without understanding
     9	# what they do.  They're here only as hints or reminders.  If you are unsure
    10	# consult the online docs. You have been warned.
    11	#
    12	# Configuration and logfile names: If the filenames you specify for many
    13	# of the server's control files begin with "/" (or "drive:/" for Win32), the
    14	# server will use that explicit path.  If the filenames do *not* begin
    15	# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
    16	# with ServerRoot set to '/www' will be interpreted by the
    17	# server as '/www/log/access_log', where as '/log/access_log' will be
    18	# interpreted as '/log/access_log'.
    19	
    20	#
    21	# ServerRoot: The top of the directory tree under which the server's
    22	# configuration, error, and log files are kept.
    23	#
    24	# Do not add a slash at the end of the directory path.  If you point
    25	# ServerRoot at a non-local disk, be sure to specify a local disk on the
    26	# Mutex directive, if file-based mutexes are used.  If you wish to share the
    27	# same ServerRoot for multiple httpd daemons, you will need to change at
    28	# least PidFile.
    29	#
    30	ServerRoot "/etc/httpd"
    31	ServerTokens ProductOnly
    32	ServerSignature Off
    33	Header always set X-Content-Type-Options nosniff
    34	Header always set X-XSS-Protection "1; mode=block"
    35	Header always set X-Frame-Options Deny
    36	Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains
    37	
    38	#
    39	# Listen: Allows you to bind Apache to specific IP addresses and/or
    40	# ports, instead of the default. See also the <VirtualHost>
    41	# directive.
    42	#
    43	# Change this to Listen on specific IP addresses as shown below to
    44	# prevent Apache from glomming onto all bound IP addresses.
    45	#
    46	#Listen 12.34.56.78:80
    47	Listen 80
    48	
    49	#
    50	# Dynamic Shared Object (DSO) Support
    51	#
    52	# To be able to use the functionality of a module which was built as a DSO you
    53	# have to place corresponding `LoadModule' lines at this location so the
    54	# directives contained in it are actually available _before_ they are used.
    55	# Statically compiled modules (those listed by `httpd -l') do not need
    56	# to be loaded here.
    57	#
    58	# Example:
    59	# LoadModule foo_module modules/mod_foo.so
    60	#
    61	Include conf.modules.d/*.conf
    62	LoadModule headers_module modules/mod_headers.so
    63	#LoadModule rewrite_module modules/mod_rewrite.so
    64	LoadModule log_config_module modules/mod_log_config.so
    65	#LoadModule rewrite_module modules/mod_rewrite.so
    66	#LoadModule ssl_module modules/mod_ssl.so
    67	#LoadModule reqtimeout_module modules/mod_reqtimeout.so
    68	
    69	#
    70	# If you wish httpd to run as a different user or group, you must run
    71	# httpd as root initially and it will switch.
    72	#
    73	# User/Group: The name (or #number) of the user/group to run httpd as.
    74	# It is usually good practice to create a dedicated user and group for
    75	# running httpd, as with most system services.
    76	#
    77	User apache
    78	Group apache
    79	
    80	# 'Main' server configuration
    81	#
    82	# The directives in this section set up the values used by the 'main'
    83	# server, which responds to any requests that aren't handled by a
    84	# <VirtualHost> definition.  These values also provide defaults for
    85	# any <VirtualHost> containers you may define later in the file.
    86	#
    87	
    88	# All of these directives may appear inside <VirtualHost> containers,
    89	# in which case these default settings will be overridden for the
    90	# virtual host being defined.
    91	#
    92	
    93	#
    94	# ServerAdmin: Your address, where problems with the server should be
    95	# e-mailed.  This address appears on some server-generated pages, such
    96	# as error documents.  e.g. admin@your-domain.com
    97	#
    98	ServerAdmin root@localhost
    99	#
   100	# ServerName gives the name and port that the server uses to identify itself.
   101	# This can often be determined automatically, but we recommend you specify
   102	# it explicitly to prevent problems during startup.
   103	#
   104	# If your host doesn't have a registered DNS name, enter its IP address here.
   105	#
   106	#ServerName www.example.com:80
   107	ServerName hml-speedtest.globe.com.ph:8080
   108	#
   109	#
   110	# UseCanonicalName: Determines how Apache constructs self-referencing
   111	# URLs and the SERVER_NAME and SERVER_PORT variables.
   112	# When set "Off", Apache will use the Hostname and Port supplied
   113	# by the client.  When set "On", Apache will use the value of the
   114	# ServerName directive.
   115	#
   116	UseCanonicalName Off
   117	#
   118	# DocumentRoot: The directory out of which you will serve your
   119	# documents. By default, all requests are taken from this directory, but
   120	# symbolic links and aliases may be used to point to other locations.
   121	#
   122	DocumentRoot "/var/www/html"
   123	
   124	#
   125	# Each directory to which Apache has access can be configured with respect
   126	# to which services and features are allowed and/or disabled in that
   127	# directory (and its subdirectories).
   128	#
   129	
   130	# First, we configure the "default" to be a very restrictive set of
   131	# features.
   132	#
   133	<Directory "/var/www">
   134	#    Options FollowSymLinks
   135	#    AllowOverride None
   136	    Options None
   137	    AllowOverride None
   138	    # Allow open access:
   139	    Require all granted
   140	    <LimitExcept GET POST OPTIONS>
   141	    Require all denied
   142	    </LimitExcept>
   143	</Directory>
   144	
   145	# Further relax access to the default document root:
   146	<Directory "/var/www/html">
   147	    #
   148	    # Possible values for the Options directive are "None", "All",
   149	    # or any combination of:
   150	    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
   151	    #
   152	    # Note that "MultiViews" must be named *explicitly* --- "Options All"
   153	    # doesn't give it to you.
   154	    #
   155	    # The Options directive is both complicated and important.  Please see
   156	    # http://httpd.apache.org/docs/2.4/mod/core.html#options
   157	    # for more information.
   158	    #
   159	    # Options Indexes FollowSymLinks
   160	    #    Options FollowSymLinks
   161	    Options -Indexes -FollowSymLinks -Includes -ExecCGI
   162	    #
   163	    # AllowOverride controls what directives may be placed in .htaccess files.
   164	    # It can be "All", "None", or any combination of the keywords:
   165	    #   Options FileInfo AuthConfig Limit
   166	    #
   167	    AllowOverride None
   168	
   169	    #
   170	    # Controls who can get stuff from this server.
   171	    #
   172	#        Order allow,deny
   173	#       Allow from all
   174	       Require all granted
   175	       <LimitExcept GET POST OPTIONS>
   176	       Require all denied
   177	       </LimitExcept>
   178	</Directory>
   179	#
   180	# DirectoryIndex: sets the file that Apache will serve if a directory
   181	# is requested.
   182	#
   183	<IfModule dir_module>
   184	    DirectoryIndex index.html
   185	</IfModule>
   186	
   187	#
   188	# The following lines prevent .htaccess and .htpasswd files from being
   189	# viewed by Web clients.
   190	#
   191	
   192	#
   193	<Files ~ "^\.ht">
   194	    Order allow,deny
   195	    Deny from all
   196	    Satisfy All
   197	</Files>
   198	# ErrorLog: The location of the error log file.
   199	# If you do not specify an ErrorLog directive within a <VirtualHost>
   200	# container, error messages relating to that virtual host will be
   201	# logged here.  If you *do* define an error logfile for a <VirtualHost>
   202	# container, that host's errors will be logged there and not here.
   203	#
   204	ErrorLog "logs/error_log"
   205	
   206	#
   207	# LogLevel: Control the number of messages logged to the error_log.
   208	# Possible values include: debug, info, notice, warn, error, crit,
   209	# alert, emerg.
   210	#
   211	LogLevel warn
   212	
   213	<IfModule log_config_module>
   214	    #
   215	    # The following directives define some format nicknames for use with
   216	    # a CustomLog directive (see below).
   217	    #
   218	    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
   219	    LogFormat "%h %l %u %t \"%r\" %>s %b" common
   220	
   221	    <IfModule logio_module>
   222	      # You need to enable mod_logio.c to use %I and %O
   223	      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio    
   224	</IfModule>
   225	
   226	    #
   227	    # The location and format of the access logfile (Common Logfile Format).
   228	    # If you do not define any access logfiles within a <VirtualHost>
   229	    # container, they will be logged here.  Contrariwise, if you *do*
   230	    # define per-<VirtualHost> access logfiles, transactions will be
   231	    # logged therein and *not* in this file.
   232	    #
   233	    #CustomLog "logs/access_log" common
   234	
   235	    #
   236	    # If you prefer a logfile with access, agent, and referer information
   237	    # (Combined Logfile Format) you can use the following directive.
   238	    #
   239	    CustomLog "logs/access_log" combined
   240	</IfModule>
   241	
   242	<IfModule alias_module>
   243	    #
   244	    # Redirect: Allows you to tell clients about documents that used to
   245	    # exist in your server's namespace, but do not anymore. The client
   246	    # will make a new request for the document at its new location.
   247	    # Example:
   248	    # Redirect permanent /foo http://www.example.com/bar
   249	
   250	    #
   251	    # Alias: Maps web paths into filesystem paths and is used to
   252	    # access content that does not live under the DocumentRoot.
   253	    # Example:
   254	    # Alias /webpath /full/filesystem/path
   255	    #
   256	    # If you include a trailing / on /webpath then the server will
   257	    # require it to be present in the URL.  You will also likely
   258	    # need to provide a <Directory> section to allow access to
   259	    # the filesystem path.
   260	
   261	    #
   262	    # ScriptAlias: This controls which directories contain server scripts.
   263	    # ScriptAliases are essentially the same as Aliases, except that
   264	    # documents in the target directory are treated as applications and
   265	# run by the server when requested rather than as documents sent to the
   266	    # client.  The same rules about trailing "/" apply to ScriptAlias
   267	    # directives as to Alias.
   268	    #
   269	    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
   270	
   271	</IfModule>
   272	
   273	#
   274	# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
   275	# CGI directory exists, if you have that configured.
   276	#
   277	<Directory "/var/www/cgi-bin">
   278	    AllowOverride None
   279	    Options None
   280	    Require all granted
   281	</Directory>
   282	
   283	<IfModule mime_module>
   284	    #
   285	    # TypesConfig points to the file containing the list of mappings from
   286	    # filename extension to MIME-type.
   287	    #
   288	    TypesConfig /etc/mime.types
   289	
   290	    #
   291	    # AddType allows you to add to or override the MIME configuration
   292	    # file specified in TypesConfig for specific file types.
   293	    #
   294	    #AddType application/x-gzip .tgz
   295	    #
   296	    # AddEncoding allows you to have certain browsers uncompress
   297	    # information on the fly. Note: Not all browsers support this.
   298	    #
   299	    #AddEncoding x-compress .Z
   300	    #AddEncoding x-gzip .gz .tgz
   301	    #
   302	    # If the AddEncoding directives above are commented-out, then you
   303	    # probably should define those extensions to indicate media types:
   304	    #
   305	    #
   306	    #AddEncoding x-compress .Z
   307	    #AddEncoding x-gzip .gz .tgz
   308	    #
   309	    # If the AddEncoding directives above are commented-out, then you
   310	    # probably should define those extensions to indicate media types:
   311	    #
   312	    AddType application/x-compress .Z
   313	    AddType application/x-gzip .gz .tgz
   314	
   315	    #
   316	    # AddHandler allows you to map certain file extensions to "handlers":
   317	    # actions unrelated to filetype. These can be either built into the server
   318	    # or added with the Action directive (see below)
   319	    #
   320	    # To use CGI scripts outside of ScriptAliased directories:
   321	    # (You will also need to add "ExecCGI" to the "Options" directive.)
   322	    #
   323	    #AddHandler cgi-script .cgi
   324	
   325	    # For type maps (negotiated resources):
   326	    #AddHandler type-map var
   327	
   328	    #
   329	    # Filters allow you to process content before it is sent to the client.
   330	    #
   331	    # To parse .shtml files for server-side includes (SSI):
   332	    # (You will also need to add "Includes" to the "Options" directive.)
   333	    #
   334	    AddType text/html .shtml
   335	    AddOutputFilter INCLUDES .shtml
   336	</IfModule>
   337	
   338	#
   339	# Specify a default charset for all content served; this enables
   340	# interpretation of all content as UTF-8 by default.  To use the
   341	# default browser choice (ISO-8859-1), or to allow the META tags
   342	# in HTML content to override this choice, comment out this
   343	# directive:
   344	#
   345	AddDefaultCharset UTF-8
   346	
   347	
   348	<IfModule mime_magic_module>
   349	    #
   350	    # The mod_mime_magic module allows the server to use various hints from the
   351	    # contents of the file itself to determine its type.  The MIMEMagicFile
   352	    # directive tells the module where the hint definitions are located.
   353	    #
   354	    MIMEMagicFile conf/magic
   355	</IfModule>
   356	
   357	#
   358	# Customizable error responses come in three flavors:
   359	# 1) plain text 2) local redirects 3) external redirects
   360	#
   361	# Some examples:
   362	#ErrorDocument 500 "The server made a boo boo."
   363	#ErrorDocument 404 /missing.html
   364	#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
   365	#ErrorDocument 402 http://www.example.com/subscription_info.html
   366	#ErrorDocument 403 Forbidden
   367	#
   368	
   369	#
   370	# EnableMMAP and EnableSendfile: On systems that support it,
   371	# memory-mapping or the sendfile syscall may be used to deliver
   372	# files.  This usually improves server performance, but must
   373	# be turned off when serving from networked-mounted
   374	# filesystems or if support for these functions is otherwise
   375	# broken on your system.
   376	# Defaults if commented: EnableMMAP On, EnableSendfile Off
   377	#
   378	#EnableMMAP off
   379	EnableSendfile on
   380	
   381	# Supplemental configuration
   382	#
   383	# Load config files in the "/etc/httpd/conf.d" directory, if any.
   384	IncludeOptional conf.d/*.conf\
   385	#
   386	# Deny access to the entirety of your server's filesystem. You must
   387	# explicitly permit access to web content directories in other
   388	# <Directory> blocks below.
   389	#
   390	<Directory />
   391	    AllowOverride none
   392	    Require all denied
   393	</Directory>
   394	#
   395	<FilesMatch "^\.ht">
   396	AllowOverride none
   397	Require all denied
   398	</FilesMatch>
   399	
   400	<FilesMatch "^.*\.(css|html?|jpg|php|aspx|asp|jsp|ini|js|pdf|txt|xml|xsl|gif|ico|jpe?g|png)$">
   401	Require all granted
   402	</FilesMatch>
   403	Header always set X-Content-Type-Options "nosniff"
   404	#Header always append X-Frame-Options SAMEORIGIN
   405	FileETag None
   406	
   407	Timeout 10
   408	KeepAlive On
   409	MaxKeepAliveRequests 100
   410	KeepAliveTimeout 15
   411	#
   412	RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
   413	#Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
   414	Header always set X-XSS-Protection "1; mode=block"
   415	Header always set X-Frame-Options "Deny"
   416	Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
   417	#
   418	#
   419	RewriteCond %{HTTP_HOST} !^www\.hml-speedtest\.globe\.com\.ph:8080 [NC]
   420	RewriteCond %{REQUEST_URI} !^/error [NC]
   421	RewriteRule ^.(.*) - [L,F]
   422	#
   423	Listen 443
   424	<VirtualHost *:443> 
   425	   ServerName hml-speedtest.globe.com.ph
   426	   DocumentRoot "/var/www/html"
   427	   #SSLEngine on
   428	   #SSLCertificateFile "/path/to/www.example.com.cert"
   429	   #SSLCertificateKeyFile "/path/to/www.example.com.key"
   430	</VirtualHost>
   431	# Note that from this point forward you must specifically allow
   432	# particular features to be enabled - so if something's not working as
   433	# you might expect, make sure that you have specifically enabled it
   434	# below.
   435	#
   436	TraceEnable off

That looks like the 22nd line [in use].

2 Likes

I think this might be due to the fact that the first ServerName on line 22 is outside of a <VirtualHost> section and a second ServerName within a <VirtualHost> section.

@Dakila22 It's probably wise to have all ServerName and related directives put in a <VirtualHost *:80> section.

Thanks @rg305!

1 Like

Thanks @Osiris will try doing that!

1 Like

I revert back, the apache failed once I saved the changes.

[root@sfp-speedtest ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2023-09-01 22:03:38 PST; 18s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 14152 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 14185 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 14185 (code=exited, status=1/FAILURE)

What was the configuration file when Apache was failing? And what was the error message in Apaches error log?

1 Like

Removed ServerName here:
106 #ServerName www.example.com:80
107
108 #
109 #
110 # UseCanonicalName: Determines how Apache constructs self-referencing

and I put ServerName and Related Directive in a <VirtualHost *:8080> setcion
423 Listen 443
Listen 8080
424 <VirtualHost *:443>
425 ServerName hml-speedtest.globe.com.ph
426 DocumentRoot "/var/www/html"
427 #SSLEngine on
428 #SSLCertificateFile "/path/to/www.example.com.cert"
429 #SSLCertificateKeyFile "/path/to/www.example.com.key"
430
<VirtualHost *:8080>
ServerName hml-speedtest.globe.com.ph
DocumentRoot "/var/www/html"

below is the error:
[root@hml-speedtest ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2023-09-01 22:03:38 PST; 18s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 14152 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 14185 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 14185 (code=exited, status=1/FAILURE)

Sep 01 22:03:38 hml-speedtest.globe.com.ph nss_cyberark[14185]: [5beef37e-0019-48dd-99a2-d2a9ef52ed4e] getgrname_r: caught exception: 00...111])
Sep 01 22:03:38 hml-speedtest.globe.com.ph httpd[14185]: [Fri Sep 01 22:03:38.329554 2023] [core:warn] [pid 14185] AH00114: Useless use....conf.
Sep 01 22:03:38 hml-speedtest.globe.com.ph httpd[14185]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8080
Sep 01 22:03:38 hml-speedtest.globe.com.ph httpd[14185]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080
Sep 01 22:03:38 hml-speedtest.globe.com.ph httpd[14185]: no listening sockets available, shutting down
Sep 01 22:03:38 hml-speedtest.globe.com.ph httpd[14185]: AH00015: Unable to open logs
Sep 01 22:03:38 hml-speedtest.globe.com.ph systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 01 22:03:38 hml-speedtest.globe.com.ph systemd[1]: Failed to start The Apache HTTP Server.
Sep 01 22:03:38 hml-speedtest.globe.com.ph systemd[1]: Unit httpd.service entered failed state.
Sep 01 22:03:38 hml-speedtest.globe.com.ph systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

Previously your Apache was listening on port 80 (and 443). Now you're configuring it for port 8080 suddenly? But that port is already taken, according to the logs.. Are you sure you need Apache to listen on port 8080?

1 Like

It's here @Osiris
107 ServerName hml-speedtest.globe.com.ph:8080

I'm not sure if mentioning a port in the ServerName directive actually does anything without the corresponding Listen 8080 directive you didn't have before.

In any case, the error is still very clear: something else, i.e. not Apache, is already listening on port 8080. What is it? And why would you want Apache on port 8080 (too)?

2 Likes

It required by Ookla. and we are using the apache as the webserver of our speedtest. please see here https://support.ookla.com/hc/en-us/articles/360027274852-Which-Ports-Am-I-Required-to-Use-

  • TCP/UDP inbound/outbound port 8080 (OoklaServer)
  • TCP/UDP inbound/outbound port 5060 (OoklaServer)
  • TCP outbound port 443 to *.speedtest.net for updates and Let's Encrypt provisioning if enabled

You mean you're running an "Ookla" speedtest server on port 8080?

I don't understand this part. The guide you've linked to does not mention Apache at all.

Can you explain more in detail what you're doing and how Apache comes into the picture?

Also, something else: the hostname hml-speedtest.globe.com.ph does not even resolve to an IP address, neither IPv4 nor IPv6?

2 Likes

In this link
"https://support.ookla.com/hc/en-us/articles/360001087752-How-do-I-enable-HTTPS-TLS-support- "
Automatic LetsEncrypt Provisioning is not working and I'm trying to create our own Let's Encrypt / Certbot Certificate from https://certbot.eff.org/ my OS is Rhel7 that's why I'm using this guide https://certbot.eff.org/instructions?ws=apache&os=centosrhel7

Thanks for the response and patience :slight_smile:

1 Like

The Ookla guide does not mention Apache.

There are multiple Certbot instructions, including indeed one for Apache. But Apache is not required for Certbot: that Apache Certbot guide is meant for people already using Apache for other things and who want to secure their already existing Apache.

To me it sounds like you're just installing Apache for getting a certificate? While Apache is not directly required for the Ookla speedtest server? Sounds like using the Certbot --standalone authenticator would suite just fine here.

1 Like

I'm on Rhel7 using httpd and in my understanding it is the same with apache? Will try using Certbot --standalone then. Thanks Osiris!