LetsEncrypt certificate is not Working in Centos 7 Apache

Greetings,

I have a big problem with my client and need help!

I have Centos 7 VM with apache installed, and I`m trying to setup LetsEncrypt SSL certificate.

My domain is: edusub.crdp.org

I used root SSH access and created a Vhost file and placed it in /etc/httpd/conf.d (attached is the content of Vhost file)

Then I did all the steps at this link (How to Install Let's Encrypt with Apache on CentOS 7 - RoseHosting)
But it does not work, however the http is still working

One further note: While installing the certbot it doesnot ask me to choose option (2: Redirect - Make...) and just give

Congratulations! you have successfully enabled https://edusub.crdp.org

I`m stuck in this and it is very critical :hot_face:. Please help!!

Hi @dgharibssl,

It looks like you have a firewall somewhere that’s blocking incoming connections on port 443. Your certificate might well be working properly, but people may still be blocked by the firewall from connecting to the site.

I will be checking the firewall and port 443 with the networking guys; However, the weird thing is when I`m installing the Letsencrypt certbot, it did not ask me to choose option 1 or 2 or C. Is this normal? is the latest version automatically installed with option (2)?

additionally, I attached here the Vhost content.Vhost file

Is <VirtualHost *.80> valid syntax ? I don’t think so. For me, a configtest produces:

[Thu Aug 20 09:23:22.516230 2020] [core:error] [pid 89] (EAI 2)Name or service not known: AH00547: Could not resolve host name *.80 -- ignoring!

That might have something to do with your lack of HTTP-to-HTTPS redirect.

1 Like

After installing the Letsencrypt, I got the following files in the conf.d directory:

Conf.d Directory:
conf.d directory

edusub.crdp.org.conf:
edusub.crdp.org.conf

edusub.crdp.org-le-ssl.conf:
edusub.crdp.org-le-ssl.conf

Certbot Certificates CMD:
Certbot Certificates CMD

Please help!

Like @_az says, your VirtualHost directives don’t look right. I’m guessing they should be <VirtualHost *:80> and <VirtualHost *:443> instead, but that’s just a guess since I don’t know what your configuration is supposed to be.

It may be that certbot got confused by the invalid syntax when it tried to update your config files, too.

You can refer to the VirtualHost documentation for the description of what the syntax is supposed to be, and run service httpd configtest to see any errors Apache can find in your config files.

2 Likes

I did the command service httpd configtest and below is the result:

httpd ConfigTest

Yes, it’s telling you the lines in your Apache config file that are syntactically incorrect. You need to fix them for your web server to work correctly.

1 Like

Any advise on how to fix them!

My guess on what the VirtualHost lines are supposed to be are up in my initial post, along with the link to the Apache documentation.

1 Like

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