cd /etc/httpd/conf/ssl.key
#create key:

openssl genrsa -des3 -out HOSTNAME.key 1024
# password: mypassword

#create CSR:
cd ..
cd ssl.csr
openssl req -new -key ../ssl.key/HOSTNAME.key -out HOSTNAME.csr
# Country Code: US
# State or Province Name: STATE
# Locality Name: CITY
# Organization Name: COMPANY
# Organization Unit: DEPARTEMT or DBA
# Common Name: HOSTNAME
# Email Address: ADMIN EMAIL ADDRSS
# Challenge: ???
# Optional Company Name: [blank]

#create self signed cert:
cd ../ssl.crt
openssl x509 -req -days 1800 -in ../ssl.csr/HOSTNAME.csr \
        -signkey ../ssl.key/HOSTNAME.key -out HOSTNAME.crt