Action 'configtest' failed?

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., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command: sudo certbot --apache

It produced this output:

Last login: Sun May 6 12:08:04 2018 from
manager@web-server:~$ sudo certbot --apache
[sudo] password for manager:
Sorry, try again.
[sudo] password for manager:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1):

Which names would you like to activate HTTPS for?


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter ‘c’ to cancel): 2
Cert not yet due for renewal

You have an existing certificate that has exactly the same domains or certificat e name you requested and isn’t close to expiry.
(ref: /etc/letsencrypt/renewal/

What would you like to do?

1: Attempt to reinstall this existing certificate
2: Renew & replace the cert (limit ~5 per 7 days)

Select the appropriate number [1-2] then [enter] (press ‘c’ to cancel): 1
Keeping the existing certificate
Created an SSL vhost at /etc/apache2/sites-available/ ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/shentaichiacad
Enabling available site: /etc/apache2/sites-available/ -ssl.conf
Error while running apache2ctl configtest.
Action ‘configtest’ failed.
The Apache error log may have more information.

AH00526: Syntax error on line 17 of /etc/apache2/sites-enabled/
Name duplicates previous WSGI daemon definition.

Rolling back to previous server configuration…
Error while running apache2ctl configtest.
Action ‘configtest’ failed.
The Apache error log may have more information.

AH00526: Syntax error on line 17 of /etc/apache2/sites-enabled/
Name duplicates previous WSGI daemon definition.


  • We were unable to install your certificate, however, we
    successfully restored your server to its prior configuration.
  • Congratulations! Your certificate and chain have been saved at:
    Your key file has been saved at:
    Your cert will expire on 2018-08-04. To obtain a new or tweaked
    version of this certificate in the future, simply run certbot again
    with the “certonly” option. To non-interactively renew all of
    your certificates, run “certbot renew”

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

The operating system my web server runs on is (include version): Ubuntu MATE 16.04

My hosting provider, if applicable, is: Myself

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

Thank you for any help if the following file is any use…

<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port t$
# 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.


    ServerAdmin webmaster@localhost
    DocumentRoot /home/manager/Websites/shen
    WSGIScriptAlias / /home/manager/Websites/shen/shen/
    WSGIDaemonProcess python-path=/home/manager/Web$

    Alias /media/ /home/manager/Websites/shen/media/
    Alias /static/ /home/manager/Websites/shen/static/

    <Directory /home/manager/Websites/shen/media>
            Require all granted

    <Directory /home/manager/Websites/shen/static>
            Require all granted

    <Directory /home/manager/Websites/shen>
                    Require all granted

    # 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

vim: syntax=apache ts=4 sw=4 sts=4 sr noet


The configtest failed means Apache has a problem starting (executing)
As the following lines of your log out put states.

Can you try to resolve this issue?

P.S. I've found this link

Thank you

1 Like

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