To generate the CA private key and CA self-signed certificate:
Genrsa-aes128-out CA/CAKEY.PEM 2048
Req-new-x509-key ca/cakey.pem-out ca/ca.crt-outform pem-config./openssl.cnf
{
Country Name (2 letter code) [AU]:CN
State or province Name (full name) [Some-state]:shanghai
Locality Name (eg, city) []:shanghai
Organization Name (eg, company) [Internet widgits Pty Ltd]:companyx
Organizational unit Name (eg, section) []:sectionx
Common name (e.g. server FQDN or YOUR name) []:myca
Email Address []:a@b.com
}
Build server private key and certificate request:
Genrsa-aes128-out SERVER/SERVERKEY.PEM 2048
(
Encryption secret keys are not supported under Win32,
1, decryption: rsa-in server/serverkey.pem-out SERVER/SERVER_NOENCRYPT.PEM
)
Req-new-key server/serverkey.pem-out server/server.csr-outform pem-config./openssl.cnf
{
Country Name (2 letter code) [AU]:CN
State or province Name (full name) [Some-state]:shanghai
Locality Name (eg, city) []:shanghai
Organization Name (eg, company) [Internet widgits Pty Ltd]:companyx
Organizational unit Name (eg, section) []:sectionx
Common name (e.g. server FQDN or YOUR name) []:127.0.0.1
Email Address []:a@b.com
Please enter the following ' extra ' attributes
To is sent with your certificate request
A Challenge Password []:
An optional company name []:
}
To sign a server/client certificate with a CA certificate:
Ca-in server/server.csr-out server/server.crt-cert ca/ca.crt-keyfile ca/cakey.pem-config./openssl.cnf
==========================================================
Modify httpd.conf:
#LoadModule Ssl_module modules/mod_ssl.so
#Include conf/extra/httpd-mpm.conf
Get rid of the front # number
Modify Httpd-ssl.conf:
Sslcertificatefile XXX/CONF/KEY/SERVER.CRT (Location of server certificate)
Sslcertificatekeyfile Xxx/conf/key/server.key (Location of the server's private key)
Sslcacertificatefile XXX/KEY/CONF/CA.CRT (the location of the CA root certificate, required for client authentication)
#SSLVerifyClient require (remove the previous ' # ' number, required for client verification)
#SSLVerifyDepth 1 (Remove the front ' # ' number, change 10 to 1, required for client verification)
==========================================================
Encountered an error:
"If you encounter Apache cannot start, you can choose My Computer-" management-"event checker-" Application log, open the Apache error report, there will be a hint of what went wrong, generally can find the reason. 】
"Apache2.4 Configure SSL to start an error: AH02577:Init:SSLPassPhraseDialog BUILTIN isn't supported on Win32 (key file C:/apache24/conf/serv Er.key)
Because the Win32 platform does not support encryption keys, this error occurs when you start Apache;
Problem Solution: Since encryption is not supported, the Server.key file is decrypted (while commenting out the httpd-ssl.conf file Sslpassphrasedialog)
Decryption: OpenSSL rsa-in server.key.org-out Server.key
Open httpd-ssl.conf find Sslpassphrasedialog builtin in front and add # "
【
1. Windows platform
Execute under Windows command Line window:
1. View all port occupancy
C:\>netstat-ano
Protocol local address external address state PID
TCP 127.0.0.1:1434 0.0.0.0:0 Listening 3236
2. View the usage of the specified port
C:\>netstat-aon|findstr "9050"
Protocol local address external address state PID
TCP 127.0.0.1:9050 0.0.0.0:0 Listening 2016
3. View the PID corresponding process
C:\>tasklist|findstr "2016"
Image name PID session name Session # Memory usage
========================= ======== ================
Tor.exe 2016 Console 0 16,064 K
4. Conclusion of the process
c:\>taskkill/f/t/im Tor.exe
】
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