From LedHed's Wiki
To create a Self Signed SSL Certificate:
openssl req -x509 -nodes -newkey rsa:1024 -keyout \ /etc/ssl/private/yourcert.key \ -out /etc/ssl/private/yourcert.pem
This creates a 1024 bit Encrypted certificate, and saves it as /etc/ssl/private/yourcert.pem
RedHat/Fedora
In RedHat based distros generating SSL certs is simplified.
To generate a server key:
make genkey
To generate certificate request:
make certreq
Once you have a Certificate Request (.csr) you can go to CACert.org to have a Signed Certificate created.