This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Ubuntu: How To Create a SSL Certificate
Ubuntu: How To Create a SSL Certificate
How To Create a SSL Certificate

Enable SSL on you server

1: enable apache2 ssl

sudo a2enmod ssl
sudo service apache2 restart

Setup ssl on you server

2: make a folder to the crt and key files

sudo mkdir /var/zpanel/hostdata/name/ssl

change name with your username

3: Create a Self Signed SSL Certificate

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /var/zpanel/hostdata/name/ssl/sitename.key -out /var/zpanel/hostdata/name/ssl/sitename.crt

Generating a 2048 bit RSA private key
writing new private key to '/var/zpanel/hostdata/name/ssl/sitename.key'
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
follow this -->
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:New York
Locality Name (eg, city) []:NYC
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Name of company
Organizational Unit Name (eg, section) []: just press enter
Common Name (e.g. server FQDN or YOUR name) []: website name
Email Address []:Email

Setup SSL to website

4: now log on to you zpanel and go to
Module Admin --> Apache Config --> Override a Virtual Host Setting
and select domain

5: under Custom Entry:


<VirtualHost *:443>
ServerAdmin Email
ServerName websitename.tld
DocumentRoot /var/zpanel/hostdata/name/public_html/website
SSLEngine on
SSLCertificateFile /var/zpanel/hostdata/name/ssl/sitename.crt
SSLCertificateKeyFile /var/zpanel/hostdata/name/ssl/sitename.key

now wait to Daemon has run take about 5 min

now hXXps://sitename.tld Works

XX = tt Smile
Sentora 1.0.3 on [Image: DO_Logo_Horizontal_Blue-3db19536.png]

-= Github =-  -= My Repo =-

My Modules
Thanks given by: Cantalupo
RE: Ubuntu: How To Create a SSL Certificate
Add at least this to your SSL configuration to disable known broken things:

SSLProtocol -All +TLSv1 +TLSv1.1 +TLSv1.2
SSLHonorCipherOrder on
Thanks given by:
RE: Ubuntu: How To Create a SSL Certificate
is working?
Is asking for CSR...
Thanks given by:
RE: Ubuntu: How To Create a SSL Certificate
Product Name : RapidSSL Certificate
Enter Certificate Signing Request(CSR) Information

Paste your CSR in the form below. Please make sure that it contains the complete header and footer "BEGIN" and "END" lines exactly
Thanks given by:
RE: Ubuntu: How To Create a SSL Certificate
Got it, creating the CSR as follows:

mkdir /var/zpanel/hostdata/zadmin/ssl
cd /var/zpanel/hostdata/zadmin/ssl
openssl genrsa -des3 -out server.key 2048
openssl req -new -key server.key -out server.csr
Thanks given by:
RE: Ubuntu: How To Create a SSL Certificate
easier free SSL here:
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS

Thanks given by: Cantalupo

Possibly Related Threads...
Thread Author Replies Views Last Post
Upgrade to Ubuntu 16.04 from 14.04 HogensHero 8 21 089 07-18-2020, 03:13 AM
Last Post: dycott78
Ubuntu: How to Enable tls/ssl in proftpd Diablo925 2 9 490 04-21-2020, 03:35 AM
Last Post: iraqiboy90
Ubuntu 18.04 or 20.04 Kangarooo 1 3 907 03-20-2020, 11:39 AM
Last Post: Jettaman

Forum Jump:

Users browsing this thread: 1 Guest(s)