After CentOS 8 is successfully installed, if you want to enable ssl, you need to perform the following operations.
Use the following command to install mod_ssl
# dnf install mod_ssl
This step is not necessary, but you can use the following command to make sure that the installed mod_ssl has been enabled.
apachectl -M | grep ssl
The server may return:
Similar to the above situation and content, you can confirm that ssl has been enabled through the above return.
If you have installed a firewall, you need to open port 443 for your firewall.
Need to execute the following command:
firewall-cmd --zone=public--permanent --add-service=https
firewall-cmd --zone=public--permanent --add-port=80/tcp
firewall-cmd --reload
systemctl restart firewalld
If your Apache httpd service uses a virtual host, you can configure your virtual host information in the following file.
/etc/httpd/conf.d/ssl.conf
In the above configuration file, you need to set the key and crt information, please refer to the configuration on the network.
Through the above steps, all the content of configuring the use of ssl on the httpd server of CentOs 8 is completed. The steps are relatively simple, just follow the above order to complete.
https://www.ossez.com/t/centos-8-apache-ssl/554
Recommended Posts