Invalid certificate lifetime and url

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: certbot --authenticator webroot --installer apache

It produced this output: Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter ‘c’ to
Starting new HTTPS connection (1):

Please read the Terms of Service at You must
agree in order to register with the ACME server at

(A)gree/©ancel: A

Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let’s Encrypt project and the non-profit
organization that develops Certbot? We’d like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.

(Y)es/(N)o: N

Which names would you like to activate HTTPS for?

2: glpi.m2m-altai.local

Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter ‘c’ to cancel): 1
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for
Input the webroot for (Enter ‘c’ to cancel): /var/www/glpi/html/
Waiting for verification…
Cleaning up challenges
Unable to clean up challenge directory /var/www/glpi/html/.well-known/acme-challenge
Created an SSL vhost at /etc/httpd/sites-available/
Deploying Certificate for to VirtualHost /etc/httpd/sites-available/
Enabling site /etc/httpd/sites-available/ by adding Include to root configuration

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.

1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you’re confident your site works on HTTPS. You can undo this
change by editing your web server’s configuration.

Select the appropriate number [1-2] then [enter] (press ‘c’ to cancel): 1

Congratulations! You have successfully enabled

You should test your configuration at:


  • Congratulations! Your certificate and chain have been saved at:
    Your key file has been saved at:
    Your cert will expire on 2018-04-22. 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”

  • Your account credentials have been saved in your Certbot
    configuration directory at /etc/letsencrypt. You should make a
    secure backup of this folder now. This configuration directory will
    also contain certificates and private keys obtained by Certbot so
    making regular backups of this folder is ideal.

  • If you like Certbot, please consider supporting our work by:

    Donating to ISRG / Let’s Encrypt:
    Donating to EFF:

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

The operating system my web server runs on is (include version): CentOS Linux release 7.4.1708 (Core)

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 says to me “Certificate name mismatch” for “SSL Report: (”.

Certificate lifetime 1 year! (but certbot says that expires after 3 months)
I do not know what to do.

It looks like Apache is not serving the HTTPS virtual host that was added by Certbot for

Can you show your virtual host list with:

apachectl -t -D DUMP_VHOSTS

apachectl -t -D DUMP_VHOSTS
Passing arguments to httpd using apachectl is no longer supported.
You can only start/stop/restart httpd using this script.
If you want to pass extra arguments to httpd, edit the
/etc/sysconfig/httpd config file.
VirtualHost configuration:
*:80 is a NameVirtualHost
default server localhost (/etc/httpd/sites-enabled/default.conf:1)
port 80 namevhost localhost (/etc/httpd/sites-enabled/default.conf:1)
port 80 namevhost (/etc/httpd/sites-enabled/glpi.conf:1)
alias glpi.m2m-altai.local
alias glpi
*:443 is a NameVirtualHost
default server (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost (/etc/httpd/sites-available/
alias glpi.m2m-altai.local
alias glpi

Looks like Certbot has created a duplicate virtual host here, but Apache is using the virtual host from ssl.conf rather than the one created by Certbot.

I am not too sure what to do in this case - depends on your setup - you may be able to copy the SSL settings from the -le-ssl.conf file to the virtual host defined in the ssl.conf.

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