Method 1
1. Installing the OpenSSL software
Yum Install-y OpenSSL Mod_ssl
2. Generate server private key, generate Server.key file
OpenSSL genrsa-des3-out Server.key 1024
httpd Start-up password-free add the following steps:
(1) CP Server.key SERVER.KEY.TMP
(2) OpenSSL rsa-in server.key.tmp-out Server.key--------This will require you to enter a password, enter the password to generate the Server.key when the line
3, fill in the certificate information, generate SERVER.CSR file
OpenSSL Req-new-key server.key-out SERVER.CSR
4, for certificate visas, generate SERVER.CRT file
OpenSSL x509-req-days 700-in server.csr-signkey server.key-out server.crt
Apache automatically enters a certificate password when configuring a multi-site SSL Certificate
Typically only one site is configured for SSL, setting Apache to automatically enter the password when booting up only need to make the Apache SSL configuration file as follows:
ssl.conf
The text willSSLPassPhraseDialogbuiltin
注释
Adding rowsSSLPassPhraseDialog exec:/ssl/ssl_pass.sh
/ssl/ssl_pass.sh
The file contents are as follows
#!/bin/sh echo"
密码
"
# # # Multi-site SSL, when there are multiple sites need to enter a password, the configuration file modification method is the same, the difference is SH script. The multi-site SSL password automatic input script is as follows
#!/bin/sh
pass1= "Site 1 password"
pass2= "Site 2 password"
Case $1in
Domain Name of site 1:443) echo $PASS 1;;
Domain Name of site 2:443) echo $PASS 2;;
Esac
Exit 0
Note: Site domain name must be filled in the site ServerName, such as the site configuration file ServerName is dt27.org
, can not be writtenwww.dt27.org
Apache SSL Boot free password