As we all know, HTTP protocol is an insecure protocol, and HTTPS protocol is the abbreviation of HTTP over SSL / TLS, which means “use”SSL/TLSHTTP, also known as “hypertext transfer security protocol”. HTTP with SSL / TLS protocol can build encrypted transmission, identity authentication network protocol.
The pages before upgrading to HTTPS are as follows
The default port of HTTPS is 443, which will be permanently added to the firewall white list.
sudo firewall-cmd --zone=public --add-port=443/tcp --permanent sudo firewall-cmd --reload
View open ports
sudo firewall-cmd --list-port 80/tcp 443/tcp
Install SSL module
sudo yum -y install mod_ssl
After installation, generate SSL configuration file in Apache configuration directory
As can be seen from the figure above, the corresponding private key and certificate are placed in the
Restart Apache service
sudo systemctl restart httpd
Access in browser
Click the red warning sign to find that the certificate is only valid for one year.
Since then, the automatic installation of SSL module has been used to implement the HTTPS.
This work adoptsCC agreementReprint must indicate the author and the link of this article