Introduction to Apache deployment of https in cryptography

Introduction to Apache deployment of https in cryptography

Purpose

Master the Apache deployment of custom certificates for https servers

Experimental environment

A Centos 7.2 with openssl components and apache httpd installed for building an https server

A Windows 10 client with Chrome browser installed

Experimental Principle

OpenSSL is an open source tool built into Linux that implements common cryptographic algorithms and applications. Through openssl operations, various cryptographic algorithms can be applied.

Experimental procedures

1. Generate an independent CA

1. Generate ca key

openssl genrsa -des3 -out ca.key 4096 

2. Generate CA certificate

 openssl req -new -x509 -days 365 -key ca.key -out ca.crt 

2. Generate the server's private key and signature request file csr

1. Generate https server private key

openssl genrsa -des3 -out myserver.key 4096 

2. Generate https server certificate request file

openssl req -new -key myserver.key -out myserver.csr 

Use the CA's certificate and key to generate our certificate

openssl x509 -req -days 365 -in myserver.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out myserver.crt

The certificate number set by set_serial

3. Install Apache's SSL module

1. Apache has been installed on the server. To implement Apache's https function, you need to install the SSL module.

yum install -y mod_ssl

If an error occurs during the installation, use ps -ef | grep yum to check the process, use kill -9 + process number to force the process to end, and then reinstall.

4. Copy the certificate to the corresponding path

cp myserver.crt /etc/pki/tls/certs/

cp myserver.key /etc/pki/tls/private/ 

5. Modify the Apache configuration file to make the certificate effective

 vim /etc/httpd/conf.d/ssl.conf 

Specify the certificate and private key paths as shown in the figure

Save and exit the file

6. Restart Apache service

systemctl restart httpd

Note the encrypted password for myserver.key

7. Test website certificate

Use the client Chrome browser to access the server https page. My server IP is 192.168.11.134

https://192.168.11.134

upscale

Continue to

Check the server certificate and click "Not secure"

Experimental Summary

CA – Server Certificate – Use CA to sign server certificate – Deploy certificate – View certificate

This is the end of this article about cryptography and apache deployment of https. For more relevant content about apache deployment of https, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of how to enable https service in Apache under Linux environment
  • Apache https configuration detailed steps

<<:  Vue Learning - VueRouter Routing Basics

>>:  Simple example of HTML text formatting (detailed explanation)

Recommend

Detailed explanation of Linux kernel macro Container_Of

Table of contents 1. How are structures stored in...

Vue implements three-level navigation display and hiding

This article example shares the specific code of ...

VMware12 installs Ubuntu19.04 desktop version (installation tutorial)

1. Experimental description In the virtual machin...

Implementation of Docker cross-host network (overlay)

1. Docker cross-host communication Docker cross-h...

The difference between float and position attributes in CSS layout

CSS Layout - position Property The position attri...

Steps for Vue to use Ref to get components across levels

Vue uses Ref to get component instances across le...

Method of Vue component document generation tool library

Table of contents Parsing .vue files Extract docu...

Steps to create a WEBSERVER using NODE.JS

Table of contents What is nodejs Install NodeJS H...

How to solve the timeout during pip operation in Linux

How to solve the timeout problem when pip is used...

Teach you how to quickly install Nginx in CentOS7

Table of contents 1. Overview 2. Download the Ngi...

How to safely shut down a MySQL instance

This article analyzes the process of shutting dow...

Tips to prevent others from saving as my web page and copying my site

Nowadays, copying websites is very common on the I...

Linux firewall iptables detailed introduction, configuration method and case

1.1 Introduction to iptables firewall Netfilter/I...