LAMP deployment package has installed the SSL module of Apache and open Certificate Authority Let's Encrypt (opens new window) for you configure the HTTPS quickly and conveniently.

In addition to the vhost configuration file, HTTPS settings do not need to modify any files in Apache

# Quick start

# Automatic deployment

If you want to use a free certificate, just run the one command sudo certbot on your instance to start the HTTPS deployment.

sudo certbot

# Manual deployment

If you have applied for a commercial certificate, complete the HTTPS configuration in just three steps:

  1. Upload your certificate to the directory of your instance: /data/cert
  2. Edit the vhost configuration file: /etc/httpd/conf.d/vhost.conf
  3. Insert the HTTPS template into <VirtualHost *:443>--</VirtualHost> and modify certificate path
    #-----HTTPS template start------------
    &lt;VirtualHost *:443>
     ServerName  mysite1.yourdomain.com
     DocumentRoot "/data/wwwroot/mysite1"
     #ErrorLog "logs/mysite1.yourdomain.com-error_log"
     #CustomLog "logs/mysite1.yourdomain.com-access_log" common
     &lt;Directory "/data/wwwroot/mysite1">
     Options Indexes FollowSymlinks
     AllowOverride All
     Require all granted
     SSLEngine on
     SSLCertificateFile  /data/cert/mysite1.yourdomain.com.crt
     SSLCertificateKeyFile  /data/cert/mysite1.yourdomain.com.key
     SSLCertificateKeyFile  /data/cert/mysite1.yourdomain.com.key
    #-----HTTPS template end------------
  4. Save file and Restart Apache service

# Special Guide

For details on configuring HTTPS pre-conditions, HTTPS configuration segment templates, precautions, detailed steps, and troubleshooting, refer to the HTTPS Special Guide (opens new window) provided by Websoft9