skip to main |
skip to sidebar
Custom SSL certificate for Apache
- Generate a Private Key:
openssl genrsa -des3 -out server.key 1024
- Generate a CSR (Certificate Signing Request):
openssl req -new -key server.key -out server.csr
- Remove Passphrase from Key:
cp server.key server.key.org openssl rsa -in server.key.org -out server.key
- Generate a Self-Signed Certificate for 5 years:
openssl x509 -req -days 1825 -in server.csr -signkey server.key -out server.crt
- Installing the Private Key and Certificate:
cp server.crt /usr/local/apache/conf/ssl.crt cp server.key /usr/local/apache/conf/ssl.key
- Configuring SSL Enabled Virtual Hosts in Apache:
SSLEngine on SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
No comments:
Post a Comment