NginX SSL 설치 가이드 > SSL 설치가이드

본문 바로가기주메뉴 바로가기

SSL / TLS
인증서


> SSL / TLS인증서 > 설치가이드

설치가이드

SSL 설치가이드
  • 관리자
  • 16-09-02 17:26
  • 13,134

[Others] NginX SSL 설치 가이드

본문


1. 인증서 설치


 갱신 설치의 경우기존 인증서 파일 백업 후 갱신된 인증서 파일 저장, Nginx 서비스 재시작만 처리 하시면 됩니다.

 

1)    nginx.conf 파일에서 SSL VirtualHost 설정

 아래 예시의 노란색 주석부분을 참고해서 설정합니다그 외의 항목은 기존 설정을 그대로 사용하면 됩니다.

server{

      listen 443 ssl;                                             ←SSL 포트설정

      server_name   certkorea.co.kr;    도메인명 입력

 

ssl_certificate  /usr/local/nginx/conf/ssl/certkorea.co,kr_crt.pem;             인증서 설정 

ssl_certificate_key  /usr/local/nginx/conf/ssl/certkorea.co,kr_key.pem;     개인키 설정

ssl_session_timeout 5m;

 

ssl_protocols   TLSv1.2;              ←SSL 프로토콜 설정

ssl_ciphers     ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;           

←SSL Cipher Suites 설정

ssl_prefer_server_ciphers on;

 

location/{

    root html;

    index index.html index.htm;

}

}

 

2)    Syntax Check

[root@localhost bin]$ ./nginx –t

nginx: the configuration file /user/local/nginx/conf/nginx.conf syntax is ok

nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

 

3)    Nginx 서비스 재시작

 $Nginx_home/bin 폴더에서 아래의 명령어로 서비스 재시작

[root@localhost bin]$ ./nginx restart

 

 서버 환경에 따라서 아래의 명령어로 설정파일만 reload해도 됩니다.

[root@localhost bin]$ ./nginx –s reload

 


2. 설치 확인


1)    SSL 포트 확인

아래의 명령어로 SSL포트가 LISTEN 되는지 확인 합니다.


2)    openssl 명령어로 확인

아래의 명령어를 이용해서 서버에서 인증서 적용 여부를 확인합니다.

openssl s_client -connect 127.0.0.1:443 | openssl x509 -noout -dates 


 127.0.0.1 대신에 localhost 나 도메인을 입력하셔도 됩니다.

 443 외에 다른 포트로 설정하신 경우해당 포트번호로 확인하시기 바랍니다.


3)    브라우저 확인

서버 브라우저 및 외부망 브라우저에서 https://도메인:SSL포트 로 접속인증서 정보를 확인합니다.


 설치관련 문의사항이나 오류가 있는 경우, 02-3444-2750 내선3(기술문의로 연락 부탁 드립니다.