Jump to content

User:Rogerhc/Create SSL self-cert in cPanel

From mediawiki.org

How I create SSL self-certificate in cPanel. If you host your wiki's on a webhost with cPanel, you can make free SSL self-certs for your test wikis. Not pretty, but more secure than testing without SSL.

Don't do this at home! Just kiddding. You are on the internet, and logged into your webhost that has cPanel. Here's how I did it for my test wiki spot.example.com -- a place to test upgrades to MediaWiki without annoying everyone who uses my production wiki.

Create Subdomain

[edit]

You may create as many subdomains of a domain you own as you like. For testing, etc.

Or if you have extra domain names at your disposal, you could create Add On Domains to connect those into your cPanel main account domain. cPanel >> Domains >> Add On Domains. But I don't have extra money to spend on registering extra domain names. So I'm using a Subdomain example below.

cPanel >> Domains >> Subdomains (Create a Subdomain)

Subdomain:                 spot
Domain:                    example.com
Document Root (default):   ~/spot.example.com
                (I use):   ~/public_html/spot

I think you can use any dir within ~/

cPanel puts a cgi-bin dir in there for some reason. Ignore or delete it.

Generate Certificate

[edit]

cPanel >> Security >> SSL/TLS (Generate Certificate)

Domain:           spot.example.com
Description:      poem of choice maybe this shows to site visitors who click the padlock icon
Address:          etc.

Click [Generate]

Now read the green box. In it there is a link _Installer_ <- click it.

That takes you to Install Cirtificate.

v

Install Certificate

[edit]

cPanel >> SSL/TLS (Install an SSL Website)

Domain > select spot.example.com from dropdown menu <
Click [Autofill by Domain]
Click [Install Certificate]

If that worked, you see a confirmation pop up.

Review

[edit]

In your wedhost's cPanel >> Security >> SSL/TLS

On right side of ^ that tool is a box with v these four sections in it:

PRIVATE KEYS (KEY)
  Generate, view, upload, or delete your private keys.
CERTIFICATE SIGNING REQUESTS (CSR)
  Generate, view, or delete SSL certificate signing requests.
CERTIFICATES (CRT)
  Generate, view, upload, or delete SSL certificates.
INSTALL AND MANAGE SSL FOR YOUR SITE (HTTPS)
  Manage SSL sites.
In third section you *Generate(d)* a self-signed cert for your domain.
In the fourth section you *Install(ed)* that cert into your domain.

Done! Now you have https://spot.example.com <- a secure (https://) connection to log into your test spot wiki without man in the middle (somewhere on the internet between you and your webhost) harvesting your wiki login username and password.