I reverted the apache conf files to what they were before. I mistakenly changed them just before I posted my last reply.
Now, sudo apachectl -t -D DUMP_VHOSTS
gives the below output:
port 443 namevhost compzets.com (/etc/apache2/sites-enabled/compzets.com-le-ssl.conf:2)
port 443 namevhost code.compzets.com (/etc/apache2/sites-enabled/compzets.com-le-ssl.conf:12)
alias code.compzets.com
port 443 namevhost fbapps.compzets.com (/etc/apache2/sites-enabled/compzets.com-le-ssl.conf:48)
alias fbapps.compzets.com
port 443 namevhost game.compzets.com (/etc/apache2/sites-enabled/compzets.com-le-ssl.conf:84)
alias game.compzets.com
port 443 namevhost plugins.compzets.com (/etc/apache2/sites-enabled/compzets.com-le-ssl.conf:120)
alias plugins.compzets.com
port 443 namevhost shopmate.compzets.com (/etc/apache2/sites-enabled/compzets.com-le-ssl.conf:156)
alias shopmate.compzets.com
port 443 namevhost webapps.compzets.com (/etc/apache2/sites-enabled/compzets.com-le-ssl.conf:192)
alias webapps.compzets.com
port 443 namevhost blog.compzets.com (/etc/apache2/sites-enabled/compzets.com-le-ssl.conf:228)
alias blog.compzets.com
port 443 namevhost www.compzets.com (/etc/apache2/sites-enabled/compzets.com-le-ssl.conf:264)
default server droplet1.compzets.com (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost droplet1.compzets.com (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost www.compzets.com (/etc/apache2/sites-enabled/compzets.com.conf:1)
port 80 namevhost compzets.com (/etc/apache2/sites-enabled/compzets.com.conf:36)
port 80 namevhost code.compzets.com (/etc/apache2/sites-enabled/compzets.com.conf:45)
alias code.compzets.com
port 80 namevhost shopmate.compzets.com (/etc/apache2/sites-enabled/compzets.com.conf:78)
alias shopmate.compzets.com
port 80 namevhost webapps.compzets.com (/etc/apache2/sites-enabled/compzets.com.conf:111)
alias webapps.compzets.com
port 80 namevhost plugins.compzets.com (/etc/apache2/sites-enabled/compzets.com.conf:144)
alias plugins.compzets.com
port 80 namevhost fbapps.compzets.com (/etc/apache2/sites-enabled/compzets.com.conf:177)
alias fbapps.compzets.com
port 80 namevhost game.compzets.com (/etc/apache2/sites-enabled/compzets.com.conf:210)
alias game.compzets.com
port 80 namevhost blog.compzets.com (/etc/apache2/sites-enabled/compzets.com.conf:243)
alias blog.compzets.com
However, the acme.sh issue cert command still gives the same error as posted above.
My apache conf file looks like below:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName compzets.com
Redirect permanent / http://www.compzets.com/
SSLCertificateFile /root/.acme.sh/www.compzets.com/www.compzets.com.cer
SSLCertificateKeyFile /root/.acme.sh/www.compzets.com/www.compzets.com.key
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /root/.acme.sh/www.compzets.com/fullchain.cer
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# 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 code.compzets.com
ServerAlias code.compzets.com
ServerAdmin webmaster@compzets.com
DocumentRoot /var/www/compzets.com/code
# 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
SSLCertificateFile /etc/letsencrypt/live/compzets.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/compzets.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/compzets.com/chain.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# 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 fbapps.compzets.com
ServerAlias fbapps.compzets.com
ServerAdmin webmaster@compzets.com
DocumentRoot /var/www/compzets.com/fbapps
# 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
SSLCertificateFile /etc/letsencrypt/live/compzets.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/compzets.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/compzets.com/chain.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# 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 game.compzets.com
ServerAlias game.compzets.com
ServerAdmin webmaster@compzets.com
DocumentRoot /var/www/compzets.com/game
# 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
SSLCertificateFile /etc/letsencrypt/live/compzets.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/compzets.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/compzets.com/chain.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# 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 plugins.compzets.com
ServerAlias plugins.compzets.com
ServerAdmin webmaster@compzets.com
DocumentRoot /var/www/compzets.com/plugins
# 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
SSLCertificateFile /root/.acme.sh/plugins.compzets.com/plugins.compzets.com.cer
SSLCertificateKeyFile /root/.acme.sh/plugins.compzets.com/plugins.compzets.com.key
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /root/.acme.sh/plugins.compzets.com/fullchain.cer
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# 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 shopmate.compzets.com
ServerAlias shopmate.compzets.com
ServerAdmin webmaster@compzets.com
DocumentRoot /var/www/shopmate.com
# 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
SSLCertificateFile /etc/letsencrypt/live/compzets.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/compzets.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/compzets.com/chain.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# 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 webapps.compzets.com
ServerAlias webapps.compzets.com
ServerAdmin webmaster@compzets.com
DocumentRoot /var/www/compzets.com/webapps
# 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
SSLCertificateFile /root/.acme.sh/webapps.compzets.com/webapps.compzets.com.cer
SSLCertificateKeyFile /root/.acme.sh/webapps.compzets.com/webapps.compzets.com.key
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /root/.acme.sh/webapps.compzets.com/fullchain.cer
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# 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 blog.compzets.com
ServerAlias blog.compzets.com
ServerAdmin webmaster@compzets.com
DocumentRoot /var/www/compzets.com/blog
# 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
SSLCertificateFile /etc/letsencrypt/live/compzets.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/compzets.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/compzets.com/chain.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# 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.compzets.com
#ServerAlias www.compzets.com
ServerAdmin webmaster@compzets.com
DocumentRoot /var/www/compzets.com
# 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
SSLCertificateFile /root/.acme.sh/www.compzets.com/www.compzets.com.cer
SSLCertificateKeyFile /root/.acme.sh/www.compzets.com/www.compzets.com.key
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /root/.acme.sh/www.compzets.com/fullchain.cer
</VirtualHost>
</IfModule>
This conf file worked okay when the CA was ZeroSSL so I assume it would work when the CA is letencrypt, isn't it?