1. 인증서 생성
openssl req -x509 -new -newkey rsa:2048 -nodes -keyout private.key -out public.pem -days 600
2. nginx 설정
server {
listen 443 ssl;
server_name ssl.test.com;
ssl_certificate /etc/ssl/public.pem;
ssl_certificate_key /etc/ssl/private.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
access_log /var/log/nginx/ssl-access.log combined;
location /favicon.ico { access_log off; log_not_found off; }
root /var/www;
}
'오픈소스 > nginx' 카테고리의 다른 글
nginx for beego (0) | 2018.02.02 |
---|---|
nginx for http2 (0) | 2018.02.02 |
nginx for flask (0) | 2018.02.02 |
nginx for express (0) | 2018.01.29 |
nginx for django (0) | 2018.01.29 |