I followed this tutorial to generate a private-key.pem
and csr.pem
for my AWS SSL Loadbalancer.
Everything went well but now I need to setup Apache and need 3 files.
SSLCertificateFile /etc/pki/tls/certs/public.crt
SSLCertificateKeyFile /etc/pki/tls/certs/private.key
SSLCertificateChainFile /etc/pki/tls/certs/intermediate.crt
From my files private-key.pem
, csr.pem
, cert.pem
and ca.pem
how can i generate public.crt
, private.key
and intermediate.crt
?
here is my .conf
entry
<VirtualHost *:80>
DirectoryIndex index.html index.php
ServerName www.mydomain.com
ServerAlias mydomain.com
DocumentRoot /var/www/mydomain.com
ErrorLog /var/log/conf.log
<Directory /var/www/mydomain.com>
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:443>
DirectoryIndex index.html index.php
ServerAdmin [email protected]
DocumentRoot /var/www/mydomain.com
ServerName www.mydomain.com
ErrorLog /var/log/conf.log
SSLEngine on
SSLProtocol all
SSLCertificateFile /etc/pki/tls/certs/cert.pem
SSLCertificateKeyFile /etc/pki/tls/certs/private-key.pem
SSLCertificateChainFile /etc/pki/tls/certs/ca.pem
#ServerPath /home
<Directory "/var/www/mydomain.com">
</Directory>
</VirtualHost>
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout 300
Mutex default
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
Don't be fooled by a files extension - they have very little meaning on a Unix system.
SSLCertificateKeyFile
should point to a PEM formatted key file which your private-key.pem should all ready be. So you can just point to it in your Apache config.http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslcertificatekeyfile