OpenSSL Ubuntu generate certificate code example
Example 1: ubuntu generate ssl certificate
1. Go to https://certbot.eff.org/instructions
2. Select Servername(i.e. Apache/Nginx), Operating System (i.e. Ubuntu 18.04, CentOS)
3. That's it you have whole instructions for ssl configuration on your server
Example 2: create self signed certificate for localhost ubuntu
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt