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)
Table of contents 1. How are structures stored in...
This article example shares the specific code of ...
1. Experimental description In the virtual machin...
1. Docker cross-host communication Docker cross-h...
Many times, after we install a web service applic...
CSS Layout - position Property The position attri...
Vue uses Ref to get component instances across le...
There are many read-write separation architecture...
Table of contents Parsing .vue files Extract docu...
Table of contents What is nodejs Install NodeJS H...
How to solve the timeout problem when pip is used...
Table of contents 1. Overview 2. Download the Ngi...
This article analyzes the process of shutting dow...
Nowadays, copying websites is very common on the I...
1.1 Introduction to iptables firewall Netfilter/I...