PurposeMaster the Apache deployment of custom certificates for https servers Experimental environmentA Centos 7.2 with openssl components and apache httpd installed for building an https server A Windows 10 client with Chrome browser installed Experimental PrincipleOpenSSL 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 procedures1. Generate an independent CA1. 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 csr1. 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 module1. 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 pathcp myserver.crt /etc/pki/tls/certs/ cp myserver.key /etc/pki/tls/private/ 5. Modify the Apache configuration file to make the certificate effectivevim /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 servicesystemctl restart httpd Note the encrypted password for myserver.key 7. Test website certificateUse 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 SummaryCA – 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:
|
<<: Vue Learning - VueRouter Routing Basics
>>: Simple example of HTML text formatting (detailed explanation)
1. Docker startup problem: Problem Solved: You ne...
Subquery in MySql database: Subquery: nesting ano...
1. Solution 1.1 Describing the interface context-...
Introduction to Dockerfile Docker can automatical...
Table of contents 1. Reverse proxy preparation 1....
Table of contents 1. Number in JavaScript 2. Math...
<br />This is an article I collected a long ...
Usually in project development, we have to deal wi...
Table of contents 1. Introduction 2. GitHub 3. Ba...
Six steps to install MySQL (only the installation...
Summary: Configure nginx reverse proxy jira and i...
Preface Most of our MySQL online environments use...
Preface First, let's see how to identify a TC...
Table of contents Install Redis on Docker 1. Find...
Let's briefly sort out the configuration of s...