# Httpd SSL error - did not provide localhost.crt

**URL:** <https://forums.rockylinux.org/t/httpd-ssl-error-did-not-provide-localhost-crt/3779>\
**Category:** Rocky Linux Help & Support\
**Created:** [August 11, 2021, 8:52am UTC](https://forums.rockylinux.org/t/httpd-ssl-error-did-not-provide-localhost-crt/3779 "2021-08-11T08:52:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hanb1n](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/hanb1n/32/1183_2.png) [@Hanb1n](https://forums.rockylinux.org/u/Hanb1n)\
**Post date:** [August 11, 2021, 8:52am UTC](https://forums.rockylinux.org/t/httpd-ssl-error-did-not-provide-localhost-crt/3779/1 "2021-08-11T08:52:48Z")

</div>

So I just installed Rocky Linux and trying to set up WordPress on it.

The basic LAMP stack installed, but when I try to set up SSL for my virtual host configuration, I got an error below.

```auto
AH00526: Syntax error on line 85 of /etc/httpd/conf.d/ssl.conf:
SSLCertificateFile: file '/etc/pki/tls/certs/localhost.crt' does not exist or is empty

```

I do not touch/edit the default configuration “ **ssl.conf** ”, but I think default **httpd** installation did not provide this SSL certificate “ **localhost.crt** ”. So I think this is a bug or something else.

Thanks.

---

<div class="post-metadata">

**Author:** ![Hanb1n](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/hanb1n/32/1183_2.png) [@Hanb1n](https://forums.rockylinux.org/u/Hanb1n)\
**Post date:** [August 11, 2021, 9:41am UTC](https://forums.rockylinux.org/t/httpd-ssl-error-did-not-provide-localhost-crt/3779/2 "2021-08-11T09:41:12Z")

</div>

Sorry.

I need to generate the certificate for “localhost” manually, as describe here.

[https://docs.rockylinux.org/guides/mod\_SSL\_apache/](https://docs.rockylinux.org/guides/mod_SSL_apache/)

Or simply using the openssl command.

```auto
openssl req -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/localhost.key -x509 -days 365 -out /etc/pki/tls/certs/localhost.crt

```

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 4:06am UTC](https://forums.rockylinux.org/t/httpd-ssl-error-did-not-provide-localhost-crt/3779/3 "2023-08-25T04:06:55Z")

</div>

Closed on August 25, 2023, 4:06am UTC


