Httpd SSL error - did not provide localhost.crt

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.

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.

Sorry.

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

https://docs.rockylinux.org/guides/mod_SSL_apache/

Or simply using the openssl command.

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