Steps on Debian:
- Install openssl with the command
apt-get install openssl
- Uncomment the line
# copy_extensions = copy
in /etc/ssl/openssl.cnf -
Copy example.org.cnf to your computer
(The magic for the multiple names is in the subjectAltName bit)
- Change all instances of 'example.org' in that file to your domain name
- To generate the key you run the following command:
openssl req -newkey rsa -config example.org.cnf -x509 -days 1095 -nodes -out example.org.pem -keyout example.org.key
- To test te certificate you can use the command
openssl x509 -in example.org.pem -text
- point your webserver to the created files (for nginx see the ssl_certificate and ssl_certificate_key directives)