Detailed explanation of how to enable https service in Apache under Linux environment

Detailed explanation of how to enable https service in Apache under Linux environment

This article describes how to enable https service in Apache under Linux environment. Share with you for your reference, the details are as follows:

First, apply for an SSL certificate. Taking Alibaba Cloud as an example, find the domain name management:

Free SSL certificate:

Configure a single domain name free certificate: (valid for one year)

Click OK to verify the certificate:

After successful review, you can download the certificate:

Download the SSL certificate for Apache:

I unzipped these three and put them in the Apache installation directory /etc/httpd/cert

Add this to httpd.conf (import all conf files under the conf.d folder):

Include conf.d/*.conf

Run these two:

yum install mod_ssl
yum install openssl openssl-devel

Find this file /etc/httpd/conf.d/ssl.conf :

Replace all contents:

<VirtualHost *:443>
  DocumentRoot "/var/www/html"
  ServerName www.msllws.top
  SSLEngine on
  SSLCertificateFile /etc/httpd/cert/932538_www.msllws.top_public.crt
  SSLCertificateKeyFile /etc/httpd/cert/932538_www.msllws.top.key
  SSLCertificateChainFile /etc/httpd/cert/932538_www.msllws.top_chain.crt
</VirtualHost>

 
NameVirtualHost *:443

Then you can access https

I hope this article will help you configure your Linux server.

You may also be interested in:
  • Apache https configuration detailed steps
  • Introduction to Apache deployment of https in cryptography

<<:  How to use axios request in Vue project

>>:  Detailed explanation of the idea of ​​installing mysql8.0.11 and changing the root password and connecting navicat for mysql

Recommend

How to implement mobile web page size adaptation

I finally finished the project at hand, and the m...

Detailed explanation of the concept, principle and usage of MySQL triggers

This article uses examples to explain the concept...

Import backup between mysql database and oracle database

Import the data exported from the Oracle database...

Vue scroll down to load more data scroll case detailed explanation

vue-infinite-scroll Install npm install vue-infin...

Detailed steps for setting up and configuring nis domain services on Centos8

Table of contents Introduction to NIS Network env...

Linux system repair mode (single user mode)

Table of contents Preface 1. Common bug fixes in ...

JS interview question: Can forEach jump out of the loop?

When I was asked this question, I was ignorant an...

How to configure mysql on ubuntu server and implement remote connection

Server: Ubuntu Server 16.04 LSS Client: Ubuntu 16...

Implementation of tomcat deployment project and integration with IDEA

Table of contents 3 ways to deploy projects with ...

JavaScript canvas to achieve code rain effect

This article shares the specific code for canvas ...

Implementation of nginx worker process loop

After the worker process is started, it will firs...

Which loop is the fastest in JavaScript?

Knowing which for loop or iterator is right for o...