This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Generate a unique private key (KEY) | |
| sudo openssl genrsa -out mydomain.key 2048 | |
| # Generating a Certificate Signing Request (CSR). Note "Common Name" should be server DNS | |
| sudo openssl req -new -key mydomain.key -out mydomain.csr | |
| # Creating a Self-Signed Certificate (CRT), see below for the contents of ssl.conf | |
| sudo openssl x509 -req -days 365 -in mydomain.csr -signkey mydomain.key -out mydomain.crt -extensions req_ext -extfile ssl.conf | |
| # Append KEY and CRT to mydomain.pem |