How to install ssl certificate with Zpanel

This will be a straight forward instructional exercise on the most proficient method to introduce a SSL certificate in Linux with Zpanel installed
The tutorial shows how to install SSL Certificate with zPanel. You can utilize a self-marked SSL Certificate or purchase.

To begin with make ssl directory to simply maintain and proceed with the following commands

linuxtweaks ~]#mkdir /var/zpanel/hostdata/zadmin/ssl
linuxtweaks ~]#cd /var/zpanel/hostdata/zadmin/ssl

If you want to install self-signed certificate first go through this linkĀ click here and generate your self signed certificate.

On the other hand in the event that you need to purchase an certificate, please submit domain_ssl.key to a SSL Provider, then you will get domain_ssl.crt and domain_ssl.ca-group records.

Assuming that you have the following
1. domain_ssl.key
2. domain_ssl.crt
3. domain_ssl.ca-bundle

Now, go to zpanel admin login and go to Server Admin >> Module Admin >> Override a Virtual Host Setting >> Select a domain and click Select Vhost

zpanel-1

zpanel-2

On port override field, enter : 443
Check ‘Forward Port 80 to Overriden Port’ on the off chance that you need to dependably utilize HTTPS
Fill IP Override : Server’s IP Address or you can leave it blank.

Next, fill the custom entry with your trusted ssl certificate as shown in below image

zpanel-3

SSLEngine On
SSLCertificateFile /var/zpanel/hostdata/zadmin/ssl/domain_ssl.crt
SSLCertificateKeyFile /var/zpanel/hostdata/zadmin/ssl/domain_ssl.key
SSLCertificateChainFile /var/zpanel/hostdata/zadmin/ssl/domain_ssl.ca-bundle
DocumentRoot "/var/zpanel/hostdata/zadmin/public_html/domain_directory"

Then final step is either wait for 2 minute or restart apache service by the following command.

linuxtweaks ~]#/etc/init.d/httpd restart

All done,

Balvinder Singh

Hello, I am Balvinder Singh - DevOps Engineer with 2.5+ year of working experience with different server environments. Tag Line:-Linux | AWS| WHM |Monitoring | Virtualization | Optimization | Performance | Security | Release & Deployment. I love helping companies / clients to deploy their code / applicateions to well managed, optimized, secure server and can go extra mile to satisfy.

You may also like...

8 Responses

  1. Milan says:

    Thank you for sharing such a valuable trick. It’s really helpful for newbie.

  2. Erick says:

    Hi, great. I’m going to try it on a server and I’ll tell you how it goes, a query, if I have more domains on the server, do I have to buy a certificate for each domain and do the same steps for each one?

  3. Erick says:

    Hi, I read these posts to install an ssl that is free for an organization that is supporting a 100% ssl website. What do you think of that script to install will be enough for zpanel or do you have to do it as you indicate some suggestion?

    Post: https://www.cristiantala.cl/certificados-ssl-gratuitos-y-validados/
    SSL Enterprise: https://letsencrypt.org/

  4. RickP says:

    Your post led me on a wild goose chase. There is an error — or at least a mismatch with my Zpanel installation. The following is incorrect:

    Server Admin >> Module Admin >> Override a Virtual Host Setting >> Select a domain and click Select Vhost

    It should be:

    Server Admin >> Module Admin >> Apache Config >> Override a Virtual Host Setting >> Select a domain and click Select Vhost

Leave a Reply

Your email address will not be published. Required fields are marked *