The machine set up window environment https

1. Download OpenSSL   http://slproweb.com/products/Win32OpenSSL.html 

2. After installation configuration environment variable OPENSSL_HOME ... \ bin Path variable plus end;% OPENSSL_HOME%

3. Create a private key openssl genrsa -des3 -out name.key 1024 need to remember a password name enter a custom name

4. Create ssr certificate openssl req -new -key name.key -out name.csr need to enter some information column, the most important is the Common Name represents the domain name you want to use to access https

The removal password replication name.key rename name.copy.key

6.执行openssl rsa -in name.copy.key -out name.key 

7. Generate crt certificate openssl x509 -req -days 365 -in test.csr -signkey name.key -out name.crt

At this point, a total of four files directory

 

 8. Modify profile nginx

 

 At the same time configure your hosts file

 

 ok then you can visit with https

Guess you like

Origin www.cnblogs.com/nick-lin/p/11479534.html