# The certificate is only valid for sys.mysite.org

**URL:** <https://community.letsencrypt.org/t/the-certificate-is-only-valid-for-sys-mysite-org/16470>\
**Category:** Server\
**Created:** [June 1, 2016, 3:51pm UTC](https://community.letsencrypt.org/t/the-certificate-is-only-valid-for-sys-mysite-org/16470 "2016-06-01T15:51:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tello](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@Tello](https://community.letsencrypt.org/u/Tello)\
**Post date:** [June 1, 2016, 3:51pm UTC](https://community.letsencrypt.org/t/the-certificate-is-only-valid-for-sys-mysite-org/16470/1 "2016-06-01T15:51:12Z")

</div>

Tried this 2 times, with the same problem.

`./certbot-auto --apache -d mysite.com -d www.mysite.com`

Result:

```
Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/mysite.com/fullchain.pem.
Your cert will expire on 2016-08-30....

```

But when accessed from any browser, [mysite.com](http://mysite.com):

```
mysite.com uses an invalid security certificate.
The certificate is not trusted because it is self-signed.
The certificate is only valid for sys.mysite.org
Error code: SEC_ERROR_UNKNOWN_ISSUER

```

[sys.mysite.org](http://sys.mysite.org) is the server host name and does not appear anywhere in Apache config files.  
Just one virtual host file is at /etc/httpd/conf.d/mysite\_com.conf

Apache 2.2  
Centos 6.8

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://community.letsencrypt.org/u/Jason)\
**Post date:** [June 1, 2016, 4:55pm UTC](https://community.letsencrypt.org/t/the-certificate-is-only-valid-for-sys-mysite-org/16470/2 "2016-06-01T16:55:23Z")

</div>

Maybe restart Apache?

---

<div class="post-metadata">

**Author:** ![Tello](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@Tello](https://community.letsencrypt.org/u/Tello)\
**Post date:** [June 1, 2016, 8:56pm UTC](https://community.letsencrypt.org/t/the-certificate-is-only-valid-for-sys-mysite-org/16470/3 "2016-06-01T20:56:49Z")

</div>

All ready did a apache restart and even server reboot, just in case. Why on earth would it create certificates for the sever name when I specifically passed in -d [mysite.com](http://mysite.com) -d [www.mysite.com](http://www.mysite.com). Makes no sense to me.

---

<div class="post-metadata">

**Author:** ![pfg](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/pfg/32/1924_2.png) [@pfg](https://community.letsencrypt.org/u/pfg)\
**Post date:** [June 1, 2016, 9:03pm UTC](https://community.letsencrypt.org/t/the-certificate-is-only-valid-for-sys-mysite-org/16470/4 "2016-06-01T21:03:15Z")

</div>

It’s unlikely that this certificate is from Let’s Encrypt. You would not get “SEC\_ERROR\_UNKNOWN\_ISSUER” for a certificate signed by Let’s Encrypt. My best guess is that your apache was already configured with a self-signed certificate prior to this, and something’s causing apache to pick this certificate rather than the new certificate.

Try `grep -r "SSLCertificateFile" /etc/httpd` if you don’t see anything obvious. If you need help amending the configuration, we’ll need your apache configuration files.

---

<div class="post-metadata">

**Author:** ![Tello](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@Tello](https://community.letsencrypt.org/u/Tello)\
**Post date:** [June 1, 2016, 9:18pm UTC](https://community.letsencrypt.org/t/the-certificate-is-only-valid-for-sys-mysite-org/16470/5 "2016-06-01T21:18:16Z")

</div>

Found this in ssl.conf after running that command:

`SSLCertificateKeyFile /etc/pki/tls/private/localhost.key`

Could this be in conflict?

---

<div class="post-metadata">

**Author:** ![pfg](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/pfg/32/1924_2.png) [@pfg](https://community.letsencrypt.org/u/pfg)\
**Post date:** [June 1, 2016, 9:21pm UTC](https://community.letsencrypt.org/t/the-certificate-is-only-valid-for-sys-mysite-org/16470/6 "2016-06-01T21:21:27Z")

</div>

Yep, `ssl.conf` is probably where the self-signed certificate is set. You’ll want to remove the relevant SSL directives in there (basically anything that matches `SSL[...]File`, feel free to post the file if you need assistance.

---

<div class="post-metadata">

**Author:** ![Tello](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@Tello](https://community.letsencrypt.org/u/Tello)\
**Post date:** [June 1, 2016, 9:24pm UTC](https://community.letsencrypt.org/t/the-certificate-is-only-valid-for-sys-mysite-org/16470/7 "2016-06-01T21:24:05Z")

</div>

Great - this will give something to investigate further. Much appreciation for your help.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [July 1, 2016, 9:24pm UTC](https://community.letsencrypt.org/t/the-certificate-is-only-valid-for-sys-mysite-org/16470/8 "2016-07-01T21:24:10Z")

</div>

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