Linux下自行颁发SSL证书


  1. openssl genrsa -des3 -out test.com.key 1024
  2. openssl req -new -key test.com.key -out test.com.csr
  3. openssl rsa -in test.com.key -out test.com_nopass.key
  4. openssl x509 -req -days 365 -in test.com.csr -signkey test.com.key -out test.com.crt

Nginx的配置:

  1. server {
  2.    server_name www.test.com;
  3.    listen  443;
  4.    index index.html index.htm index.php;
  5.    root  /data/wwwroot/www.test.com;
  6.    ssl on;
  7.    ssl_certificate test.com.crt;
  8.    ssl_certificate_key test.com_nopass.key;
  9.    ......
  10. }

  1. #1 by taffy on 2011-07-05 - 13:41

    This codes are very complicated,did you make this codes by yourself? Because if yes then i should say that you have a brilliant idea.

  2. #2 by 易水寒沙 on 2011-08-25 - 16:42

    Not by myself.

(will not be published)