SSL certificate is invalid after renewal

certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Found the following certs:
Certificate Name: www.jobsforops.com
Serial Number: 431268f3abc75e0a33ec4c5c0e1a7ac0525
Key Type: RSA
Domains: www.jobsforops.com
Expiry Date: 2022-01-05 09:16:18+00:00 (VALID: 88 days)
Certificate Path: /etc/letsencrypt/live/www.jobsforops.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/www.jobsforops.com/privkey.pem

There is the problem:

You have no cert to cover the name "jobsforops.com".

how should i resolve it sir
please provide me the solution

You need to redo the step that you did to get the cert you have now.
But include both names on the new request.

but i have just used this command to renew sir ,i didnot include any domains in the command
sudo certbot renew --no-self-upgrade

Not "renew".
You need to get a new cert - with two names on it.
Do you recall how you got the cert you have now?

1 Like

no sir
it was done by previous employee
but he was left now

Try:
history | grep certbot | grep -i jobsforops.com

Then we will have to guess.
Please show the files:
/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/vhost.conf

And my apology for not noticing it sooner.
There is a name:port overlap conflict in your config:

[two separate files are using the same name on the same port]

1.txt (12.0 KB)
2.txt (1.7 KB)

and regarding this port conflict pls tell me the solution sir

To remove the port conflict: Remove the vhost section from the main config file.
[all of]

<VirtualHost *:80>
...
</VirtualHost>

Then update the second file as follows:

<VirtualHost *:80>
  ServerName "jobsforops.com"
  ServerAlias "www.jobsforops.com"
  DocumentRoot "/var/www/html"
  <Directory /var/www/html/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
  </Directory>
  RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge [NC]
  RewriteCond %{HTTPS} !=on
  RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>

Restart Apache.

Then we may be able to test with:

sudo certbot certonly --webroot -w /var/www/html -d jobsforops.com -d www.jobsforops.com --dry-run
1 Like

yes sir i have repalced the text and
restarted
then run the command for dry run
and the output for dry run was successfull

what is the next step sir

OK now get a real cert, with:

sudo certbot certonly --webroot -w /var/www/html -d jobsforops.com -d www.jobsforops.com

[without --dry-run]

Then show:
certbot certificates

1 Like

Please show:
certbot certificates

Saving debug log to /var/log/letsencrypt/letsencrypt.log


Found the following certs:
Certificate Name: www.jobsforops.com
Serial Number: 4e74c417334cf426b42da85bcfee2fb335e
Key Type: RSA
Domains: jobsforops.com www.jobsforops.com
Expiry Date: 2022-01-06 18:35:47+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/www.jobsforops.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/www.jobsforops.com/privkey.pem


Ok
Just restart Apache and both names should work securely.

1 Like