How to generate Self-Signed SSL on cPanel server using command line

Run and put your domain:

read -p "Domain: " domain; username=`/scripts/whoowns $domain`; email=`grep @ /var/cpanel/users/$username |tail -n1 |cut -d '=' -f2|sed -e 's/@/\%40/'`; whmapi1 generatessl domains=$domain countryName=US stateOrProvinceName=Texas localityName=Houston organizationName="The Justice League of GG" emailAddress=$email pass=`openssl rand -base64 15` keysize=2048 skip_certificate=0

Now use WHM to install it

Enjoy!… Read the rest