Nginx 와 openssl 기반 https 구현

2250 단어
[root@localhost ssl]# yum -y install openssl
[root@localhost ssl]# mkdir /usr/local/nginx/conf/ssl/
[root@localhost ssl]# cd /usr/local/nginx/conf/ssl/
[root@localhost ssl]# openssl genrsa -des3 -out server.key 1024 //      (              )
[root@localhost ssl]# openssl req -new -key server.key -out server.csr(      ,       )
[root@localhost ssl]# cp server.key server.key.org (        ) 
[root@localhost ssl]# openssl rsa -in server.key.org -out server.key (      )
[root@localhost ssl]# openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt (        )
 [root@localhost ~]# vim /usr/local/nginx/conf/nginx.conf (  nginx     )
server {
        listen       443 default ssl;
        keepalive_timeout 100;
        server_name  localhost;
        charset utf-8;

        ssl_certificate      /usr/local/nginx/conf/ssl/server.crt;
        ssl_certificate_key  /usr/local/nginx/conf/ssl/server.key;
ssl_session_cache    shared:SSL:10m;
        ssl_session_timeout  10m;

        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers  on;
}

좋은 웹페이지 즐겨찾기