The error was: PluginError('There has been an error in parsing the file /etc/httpd/conf/httpd.conf on line 422: Syntax error',)

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: pomec.net

I ran this command: /usr/bin/certbot -v renew

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): 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.22.0

I am also using Rocky Linux 8.6 and have 5 virtual domains all listed with letsencrypt that fail to upgrade certificates with certbot. all have the same error messages

All renewals failed. The following certificates could not be renewed:
/etc/letsencrypt/live/www.eccare.com/fullchain.pem (failure)
/etc/letsencrypt/live/www.ennform.com/fullchain.pem (failure)
/etc/letsencrypt/live/www.neuthesis.com-0001/fullchain.pem (failure)
/etc/letsencrypt/live/www.neuthesis.com/fullchain.pem (failure)
/etc/letsencrypt/live/www.pomec.net/fullchain.pem (failure)
/etc/letsencrypt/live/www.professionalexamservices.com/fullchain.pem (failure)

This was the first time to renew the certificates and all failed to renew.

I would appreciate your help

Greg Ennis

1 Like

Hi @pomec, and welcome to the LE community forum :slight_smile:

Please show the file:
/etc/httpd/conf/httpd.conf

Also, HTTP authentication requires a working HTTP site:

curl -Ii www.eccare.com
curl: (56) Recv failure: Connection reset by peer
6 Likes

When I checked teh httpd.conf file :

apachectl configtest
Syntax OK

The file is as -

#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see 
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# See the httpd.conf(5) man page for more information on this configuration,
# and httpd.service(8) on using and configuring the httpd service.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
# with ServerRoot set to '/www' will be interpreted by the
# server as '/www/log/access_log', where as '/log/access_log' will be
# interpreted as '/log/access_log'.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/etc/httpd"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
Include conf.modules.d/*.conf

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin root@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
# <Directory> blocks below.
#
<Directory />
    AllowOverride none
    Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

#
# Relax access to content within /var/www.
#
<Directory "/var/www">
    AllowOverride None
    # Allow open access:
    Require all granted
</Directory>

# Further relax access to the default document root:
<Directory "/var/www/html">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
<Files ".ht*">
    Require all denied
</Files>

#
# 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 "logs/error_log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    #CustomLog "logs/access_log" common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    CustomLog "logs/access_log" combined
</IfModule>

Alias /usage.eccare/ "/var/www/usage/eccare/"
<Directory "/var/www/usage/eccare">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from 10.0.0.0/24 10.0.1.0/24 10.0.2.0/24 
</Directory>

Alias /usage.pomec/ "/var/www/usage/pomec/"
<Directory "/var/www/usage/pomec">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from 10.0.0.0/24 10.0.1.0/24 10.0.2.0/24
</Directory>

Alias /usage.pesi/ "/var/www/usage/pesi/"
<Directory "/var/www/usage/pesi">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from 10.0.0.0/24 10.0.1.0/24 10.0.2.0/24
</Directory>

Alias /usage.neuthesis/ "/var/www/usage/neuthesis/"
<Directory "/var/www/usage/neuthesis">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    # For some reason the network range would not work
    Allow from All
    #Allow from 10.0.0.0/24 10.0.1.0/24 10.0.2.0/24
</Directory>

<IfModule alias_module>

Alias /usage.ennform/ "/var/www/usage/ennform/"
<Directory "/var/www/usage/ennform">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    # For some reason the network range would not work
    Allow from All
    #Allow from 10.0.0.0/24 10.0.1.0/24 10.0.2.0/24
</Directory>

<IfModule alias_module>


#    Alias /usage.eccare/ "/var/www/usage/eccare/"
#          <Directory "/var/www/usage/eccare">
#          Options None
#          AllowOverride None
#          Order deny,allow
#          Deny from all
#          Allow from 10.0.0.0/24 10.0.1.0/24 10.0.2.0/24
#          </Directory>
    #
    # Redirect: Allows you to tell clients about documents that used to 
    # exist in your server's namespace, but do not anymore. The client 
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts. 
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

</IfModule>

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /etc/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
</IfModule>

#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default.  To use the 
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8

<IfModule mime_magic_module>
    #
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type.  The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #
    MIMEMagicFile conf/magic
</IfModule>

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall may be used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults if commented: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
EnableSendfile on

# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf

Include /etc/httpd/sites-enabled

Include /etc/httpd/sites-available/com.eccare.www-le-ssl.conf
Include /etc/httpd/sites-available/com.neuthesis.www-le-ssl.conf
Include /etc/httpd/sites-available/net.pomec.www-le-ssl.conf
Include /etc/httpd/sites-available/com.professionalexamservices.www-le-ssl.conf
Include /etc/httpd/sites-available/com.ennform.www-le-ssl.conf

I have the site using https it is active but the certificates of course have to be accepted manually now because of the renewal problem
Greg Ennis

Can you please edit your post with the Apache config so there are 3 backticks before and after your data. Some items were lost in formatting. Like this

```
the data you posted
```
Maybe better would be for you to upload it if possible. Use the upload button on the format menu.

6 Likes

The http.conf file only has 417 lines, so line 422 must be from the included files.
Please show:
ls -l /etc/httpd/conf/*.conf
ls -l /etc/httpd/sites-enabled

cat /etc/httpd/sites-available/com.eccare.www-le-ssl.conf
cat /etc/httpd/sites-available/com.neuthesis.www-le-ssl.conf
cat /etc/httpd/sites-available/net.pomec.www-le-ssl.conf
cat /etc/httpd/sites-available/com.professionalexamservices.www-le-ssl.conf
cat /etc/httpd/sites-available/com.ennform.www-le-ssl.conf
6 Likes

Rudy, I tried to download the config files but this system would not allow a *.conf file type so I copied them as a txt file and downloaded according.

httpd.conf.txt (13.5 KB)

autoindex.conf.txt (2.9 KB)
fcgid.conf.txt (401 Bytes)
manual.conf.txt (344 Bytes)
ssl.conf.txt (8.5 KB)
userdir.conf.txt (1.2 KB)
webalizer.conf.txt (302 Bytes)
welcome.conf.txt (574 Bytes)

com.eccare.www.txt (927 Bytes)
com.ennform.www.txt (936 Bytes)
com.neuthesis.www.txt (954 Bytes)
com.professionalexamservices.www.txt (1.3 KB)
net.pomec.www.txt (918 Bytes)

I did not copy any of the files in /etc/httpd/conf.modules.d directory, bujt if you really want them I will be happy to do the same for them.

I sure appreciate your help with this. Our websites are not being used because of this problem.
The inital setup and use of letsencrypt went very smoothly.

Greg Ennis

1 Like

Do these exist?:
/run/mod_fcgid
/run/mod_fcgid/fcgid_shm
/usr/share/httpd/manual
/usr/libexec/httpd-ssl-pass-dialog
/run/httpd/sslcache
/home
/var/www/usage

5 Likes

Please show:
ls -ltr /etc/httpd/conf/*.conf

5 Likes

The result of -
ls -ltr /etc/httpd/conf/*
-rw-r--r--. 1 root root 13064 Jun 22 09:18 /etc/httpd/conf/magic
-rw-r--r--. 1 root root 13844 Jul 10 20:36 /etc/httpd/conf/httpd.conf
-rw-r--r--. 1 root root 13844 Jul 11 12:57 /etc/httpd/conf/httpd.conf.txt

/run/mod_fcgid
/run/mod_fcgid/fcgid_shm
/usr/share/httpd/manual
/usr/libexec/httpd-ssl-pass-dialog
/home
/var/www/usage

All of these above directories do exist

/run/httpd/sslcache

This directory above does not exist

Thank you for your help !!!
Greg Ennis

1 Like

Please show:
ls -l /run/httpd/ssl*

5 Likes
5 Likes

There are no files in /run/httpd/ diretory that begin with ssl

lrwxrwxrwx. 1 root root  41 Apr  9 08:47 com.eccare.www -> /etc/httpd/sites-available/com.eccare.www
lrwxrwxrwx. 1 root root  42 Apr 10 12:14 com.ennform.www -> /etc/httpd/sites-available/com.ennform.www
lrwxrwxrwx. 1 root root  44 Apr  9 12:20 com.neuthesis.www -> /etc/httpd/sites-available/com.neuthesis.www
lrwxrwxrwx. 1 root root  59 Apr  9 12:20 com.professionalexamservices.www -> /etc/httpd/sites-available/com.professionalexamservices.www
lrwxrwxrwx. 1 root root  40 Apr  9 12:20 net.pomec.www -> /etc/httpd/sites-available/net.pomec.www

hmm...
Then this is redundant:

6 Likes

The sites enabled for us are the same as sites that are available. This setting allows us to be able to take one site down without affecting the others for maintenance or development of one site at a time.

I don't follow.

The first include loads ALL the files in the /sites-enabled/ [ALL 5 sites]
Then individual includes load files from /sites-available/ [SAME 5 sites]

6 Likes

The only sites that are loaded are those enabled, the sites available are the list of all sites, and in the sites enabled there are symbolic links to the sites that are available. That way we can control what sites are up and down with the symbolic links in the directory 'enabled;

You fail to hear/understand me.

The configuration includes BOTH.
It includes the /sites-enabled/ AND it includes the /sites-available/.
But the /sites-enabled/ ARE the /sites-available/.
So...
It includes them twice.

6 Likes

I see what you mean.

Upon reflection the enabled sites are for http:// and the enabled sites all do a rewrite via
"RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]" which I believe will require the following when it changes to https://
I will attach the other ssl conf files
com.eccare.www-le-ssl.conf.txt (1020 Bytes)
com.ennform.www-le-ssl.conf.txt (1.0 KB)
com.neuthesis.www-le-ssl.conf.txt (1.0 KB)
com.professionalexamservices.www-le-ssl.conf.txt (1.4 KB)
net.pomec.www-le-ssl.conf.txt (1011 Bytes)