Where certificate files being created while using openssl? How to install custom generated certificate on Apache https?
root@ubuntu:/# openssl req \
> -x509 -nodes -days 365 \
> -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
Generating a 1024 bit RSA private key
......++++++
........................++++++
writing new private key to 'mycert.pem'
-----
root@ubuntu:/# openssl pkcs12 -export \
> -out mycert.pfx -in mycert.pem \
> -name "My Certificate"
Enter Export Password:
Verifying - Enter Export Password:
/etc/apache2/sites-available/default-ssl
SSLCertificateFile /etc/ssl/certs/mycert.pem
SSLCertificateKeyFile /etc/ssl/private/mycert.key # ???
As far as I understand I should include in /etc/apache2/sites-available/default-ssl directives which define SSL certificated. What folder used to store generated certificates mycert.pem? Where to get mycert.key file?
Tried to generate
openssl req -new -sha1 -newkey rsa:1024 -nodes -keyout mycert.key -out localhost.csr -subj '/O=Company/OU=Department/CN=localhost