roland:/etc/apache2/ssl# cd /etc/apache2/ssl
roland:/etc/apache2/ssl# openssl genrsa -out zomaarroland.nl.key 1024
Generating RSA private key, 1024 bit long modulus
..........++++++
.....++++++
e is 65537 (0x10001)
roland:/etc/apache2/ssl# chmod 600 zomaarroland.nl.key
roland:/etc/apache2/ssl# openssl req -new -key zomaarroland.nl.key -out zomaarroland.nl.key.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:
Email Address []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: (no challenge)
An optional company name []:
roland:/etc/apache2/ssl# openssl x509 -req -days 365 -in zomaarroland.nl.key.csr -signkey zomaarroland.nl.key -out zomaarroland.nl.crt
Signature ok
subject=/C=../ST=../L=../O=../CN=Name/emailAddress=your@mail.com
Getting Private key
roland:/etc/apache2/ssl# mv apache.pem apache.pem.old
roland:/etc/apache2/ssl# cp zomaarroland.nl.key apache.pem
roland:/etc/apache2/ssl# cat zomaarroland.nl.crt >> apache.pem
roland:/etc/apache2/ssl# chmod 600 apache.pem
roland:/etc/apache2/ssl# /etc/init.d/apache2 restart
Forcing reload of web server: Apache2.
roland:/etc/apache2/ssl#