Generate Certificate
Generate Certificate from Free Certificate Provider
This time we are using zerossl to generate free certificate. Use “Create Certificate”:

Input domain name of the certificate:

Free certificate only support 90 days duration:

Use autogenerate CSR

Select free plan

Domain validation is mandatory. We are using domain owner’s email to validate:

Email is sent for validation:

After validation, certificate can be downloaded:

Install Certificate for Nginx
Totally 3 files can be downloaded:
- ca_bundle.crt
- certificate.crt
- private.key
Concatenate Final Certificate File
cat certificate.crt ca_bundle.crt >> zero_ssl.crt
Rename crt file and key file

Configure Nginx
Modify conf file to use the new certificate
server {
listen 443 ssl;
server_name localhost;
root /usr/local/nginx/html;
index index.php;
ssl_certificate cert/20210904/zero_ssl.crt;
ssl_certificate_key cert/20210904/zero_ssl.key;
...
Restart Nginx
nginx -s reload
Verify Certificate
