sudo openssl genrsa -des3 -out server.key 1024\Now it’s time to create a certificate-signing request. If you set up a passphrase in the previous step, you will be prompted to enter it in this step as well:
sudo openssl req -new -key server.key -out server.csrThis command will prompt terminal to display a lists of fields that need to be filled in.
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]:US State or Province Name (full name) [Some-State]:New York Locality Name (eg, city) :NYC Organization Name (eg, company) [Internet Widgits Pty Ltd]:Awesome Inc Organizational Unit Name (eg, section) :Dept of Merriment Common Name (e.g. server FQDN or YOUR name) :example.com Email Address :email@example.comFinally, remove the passphrase:
sudo cp server.key server.key.org sudo openssl rsa -in server.key.org -out server.keyFinish by specifying how long the certificate should remain valid by changing the 365 to the number of days you prefer. As it stands this certificate will expire after one year.
sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
sudo nano /etc/httpd/conf/httpd.confOnce there, uncomment the following line:
Include conf/extra/httpd-ssl.confRestart apache to put your changes into effect:
sudo systemctl restart httpdIn your browser, type https://youraddress, and you will be able to see the new self-signed certificate.
Article ID: 217
Created On: Sun, Dec 29, 2013 at 6:40 AM
Last Updated On: Sun, Dec 29, 2013 at 6:40 AM
Authored by: ASPHostServer Administrator [firstname.lastname@example.org]
Online URL: http://faq.asphosthelpdesk.com/article.php?id=217