Apache SSL Boot free password

Source: Internet
Author: User
Tags openssl rsa openssl x509 ssl certificate

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.confThe text willSSLPassPhraseDialogbuiltin注释
Adding rowsSSLPassPhraseDialog exec:/ssl/ssl_pass.sh
/ssl/ssl_pass.shThe 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.