Can't renew my ceryificate due to redirection http to https

I configured HTTP vhost to redirect to https. when I tried to renew my domain, I faced the below error then removed the redirection, works fine. so now how can I renew the certificate in case using redirection in my HTTP configuration.

My domain is:

I ran this command: certbot renew

It produced this output:
Processing /etc/letsencrypt/renewal/
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/ (failure)


  • The following errors were reported by the server:

    Type: connection
    Detail: Fetching
    Error getting validation data

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A/AAAA record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you’re using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

My web server is (include version): apache 2.14

The operating system my web server runs on is (include version): Centos7

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

Hi @amna

there is a / missing. is wrong, you need

So add a slash to your redirect rule.

sorry where can i add this “/”
my vhost (http) configiration file like below

<VirtualHost *:80>
    Redirect "/" ""

    DocumentRoot     /dir2/dir1
    ErrorLog        /dir3/dir4/log/error_wiki.log
    CustomLog       /dir3/dir4/log/access_wiki.log common

Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted

At the end of your redirect command:

Redirect "/" ""

Ah, got it …sorry another question , why should i restart Apache after renew. as you know this not allowed in production environment

The Apache should use the new certificate. But you can do the restart later. Or you check the renew in the night.

PS: I see, now there

is a new Letsencrypt certificate, created today. So it works :wink:

There are multiple ways to restart Apache. The "Graceful Restart" method (or equivalently the "reload" operations of the service or systemctl commands) is the usual choice for production environments and is sufficient for this purpose.

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