CentOS 8 Apache enable SSL

After CentOS 8 is successfully installed, if you want to enable ssl, you need to perform the following operations.

Install mod_ssl

Use the following command to install mod_ssl

# dnf install mod_ssl

Make sure mod_ssl is enabled##

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.

Firewall enable port 443##

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

Configure virtual host##

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

CentOS 8 Apache enable SSL
CentOS 8 enable NTP service
centos6.9 rabbitmq set up SSL
CentOS 8 (2)
CentOS 8 (1)
How to install Apache on CentOS 8
CentOS yum install Apache + PHP + Tomcat7 + MySQL
How to install Apache Kafka on CentOS 7
Protect Apache with Let's Encrypt on CentOS 8
Linux environment construction: CentOs + Apache + MySQL + PHP
CentOS 7 Apache Multi-port Deployment Web Apps Guide