<div dir="ltr"><div>The filenames themselves are insignificant. You can name them anything you want. The apache configuration file(s) contain key/value pairs where SSLCertificateFile specifies the path to the file containing your certificate and SSLCertificateKeyFile specifies the path to the file containing your private key. There is no requirement that these filenames match the name of your server. It sounds to me like you don't understand how certificates work. I suggest you read a certificate tutorial such as this one: <a href="http://www.steves-internet-guide.com/ssl-certificates-explained/">http://www.steves-internet-guide.com/ssl-certificates-explained/</a></div><div><br></div><div>Once you understand how certificates work, I suggest reading the apache documentation available here: <a href="https://httpd.apache.org/docs/current/">https://httpd.apache.org/docs/current/</a> and, specifically, the documentation for mod_ssl available here: <a href="https://httpd.apache.org/docs/current/mod/mod_ssl.html">https://httpd.apache.org/docs/current/mod/mod_ssl.html</a></div><div><br></div><div></div><div></div><div><br></div><div>Regards,</div><div>Tom.III</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 4, 2020 at 3:20 AM Jason Long via openssl-users <<a href="mailto:openssl-users@openssl.org">openssl-users@openssl.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
I think “localhost.crt” and “localhost.key” files using by Apache and they are mandatory for get a HTTPS certificate. Some tools like "Certbot" need them.<br>
If these files deleted then how can I regenerate them? Is below command OK?<br>
<br>
# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/pki/tls/private/localhost.key -out /etc/ssl/certs/localhost.crt<br>
<br>
I found "/usr/libexec/httpd-ssl-gencerts" tool. Is it OK too?<br>
<br>
The "localhost" is the name of my server? If my server name in "/etc/hosts" file is "<a href="http://my-example.net" rel="noreferrer" target="_blank">my-example.net</a>" then these files name must be "my-example.net.key" and "my-example.net.crt" ?<br>
<br>
I'm thankful if anyone answer to my questions clearly.<br>
<br>
Thank you.<br>
</blockquote></div>