이 문서는 Nginx SSL 인증서 설정을 공유하기 위해 작성되었다. Nginx 는 일반적으로 .pem 확장자로 SSL 인증서 설정을 진행합니다.
PEM 암호를 제거하는 방법
openssl rsa
명령을 사용하여 암호를 제거 할 수 있습니다 . 인수로 SSL을 전달 하고 파일을 출력으로 .key
얻습니다 .
$ openssl rsa -in root_with_pass.key -out root.key
Nginx.conf에 해당 SSL 인증서 정보를 입력합니다.
Nginx.conf 추가
ssl_certificate root.pem; ssl_certificate_key root.key;
예시) Nginx.conf 정보
server { listen 443 ssl; server_name confluence.curvc.com; ssl_certificate root.pem; ssl_certificate_key root.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:!RC4:HIGH:!MD5:!aNULL:!EDH; ssl_prefer_server_ciphers on; location / { proxy_pass_header Server; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass https://1.1.1.10:8080; #프록시 IP } error_page 401 402 403 404 /error.html; location = /error.html { root html; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }