use custom setup that use nginx as web engine with cpanel need command to export ssl files to use it into nginx
cpanel now use AutoSSL powered by Comodo that give it fr
I'm sure some efficiency nuts will choke on this, but it should work:
#!/bin/bash
# Look for ServerName, and extract the value. Loop over results.
for server in $( grep ServerName httpd.conf | sed 's/.*ServerName\s*//' ); do
echo $server
# Pull out the block of XML for that server
block=$( grep -A5 "$server" httpd.conf)
# Extract file names from the XML block
SSLCertificateFile=$( echo "$block" | sed -n 's/.*SSLCertificateFile\s*//p')
SSLCertificateKeyFile=$( echo "$block" | sed -n 's/.*SSLCertificateKeyFile\s*//p')
SSLCACertificateFile=$( echo "$block" | sed -n 's/.*SSLCACertificateFile\s*//p')
# Create files
cp "$SSLCertificateKeyFile" "${server}.key"
cat "$SSLCertificateFile" "$SSLCACertificateFile" > "${server}.crt"
done
# end of loop