How to add Https to your website
— web, security — 1 min read
- Purchase SSL certificate, e.g. bought mine through Namecheap
- Generate CSR and key on server
ssh in
, install SSL
, run SSL cmd
and download output
- example SSL command:
openssl req -new -newkey rsa:2048 -nodes -out yoursite_com.csr -keyout yoursite_com.key -subj "/CN=yoursite.com"
- Stackoverflow: How to create a csr file for azure web app
- Verify ssl with csr, e.g. copy csr and paste into namecheap
- Activate ssl by selecting method, e.g. I chose whois email which forwards onto your actual email
- Download package which contains the files:
.ca-bundle
, .crt
, .p7b
- Azure needs a
pfx
(or pkcs#12
) file, use online tool to convert .p7b
, .key
, and any password to a pfx
, decoder.link/converter
- At the link above use
PEM
to PKCS#12
- OpenSSL also generated
.key
file when running the command before, locate this file and upload it to the converter page as the key file
- Upload the
.cert
file from the package for Certificate file
- Upload the
.ca-bundle
file from the package for the Bundle file
- Enter a password which will be used when uploading the
PFX
file
- Go to Azure, go to the app, then TLS/SSL settings, click Private key certificates (
.pfx
) then Upload certificate
- Upload generated pfx file and enter the same password as in step 6.5
- Done!