# Localhost.crt does not exist or is empty

**URL:** <https://community.letsencrypt.org/t/localhost-crt-does-not-exist-or-is-empty/103979>\
**Category:** Help\
**Created:** [October 13, 2019, 5:01am UTC](https://community.letsencrypt.org/t/localhost-crt-does-not-exist-or-is-empty/103979 "2019-10-13T05:01:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![\_az](https://avatars.discourse-cdn.com/v4/letter/_/22d042/32.png) [@\_az](https://community.letsencrypt.org/u/_az)\
**Post date:** [October 13, 2019, 6:01am UTC](https://community.letsencrypt.org/t/localhost-crt-does-not-exist-or-is-empty/103979/2 "2019-10-13T06:01:48Z")

</div>

It’s a problem with the mod\_ssl package in RHEL8 and CentOS 8. When you install it the first time, it produces an invalid Apache configuration.

Supposedly, restarting Apache via systemd fixes it:

```
systemctl restart httpd

```

Beneath the hood, it causes the following command to run, which fixes generates the missing snakeoil certificates:

```
/usr/libexec/httpd-ssl-gencerts
```

---

_[View the full topic](https://community.letsencrypt.org/t/localhost-crt-does-not-exist-or-is-empty/103979)._
