SSL 설치 가이드

(nginx, apache)

아파치와 nginx 로 나누어 작성 하였습니다.

작성 기준은 리눅스 인증서 pem 인증서 기준 입니다.

업체에 인증서 요청 할 때 pem 인증서로 보내 주세요 하고 요청 해야 합니다.

인증서 적용시 3개의 파일이 필요 합니다.

Step 1

*최초 시작하기 , 파일이 암호화 되어있는지, 아닌지를 확인해야 .

-확인방법

#cat xxxxxx.xxx 파일을 열어 아래처럼 문구가 있는 경우는, 암호를 해제해야함.

    암호화가 되어있는 경우, 아래 처럼 BEGIN ENCRYPTED~ 이라고 표시됨

Step 2

[암호화된 key.pem 암호화 해제 방법]

#openssl rsa -in 인증서 파일명 -out 변경할 파일명

ex) openssl rsa -in PrivateKey.key -out PrivateKeyUn.key

    암호화가 해제되면 경우, 아래 처럼 BEGIN CERTIFICATE 이라고 표시됨


NGINX



/etc/nginx/nginx.conf(8070 ssl 적용)

---------------------------------------------------------------------------------------------------------------------------------------------------

server {

        listen 8070 ssl;                                 // 8070 옆에 ssl 기입

        client_max_body_size 20M;

        root /klpbx/callrabi/cms;

        ssl_certificate /etc/nginx/ssl/__hiqri_ai_cert.pem;  // 인증서 절대 경로 입력

        ssl_certificate_key /etc/nginx/ssl/PrivateKeyUn.key; // 인증서 절대 경로 입력

---------------------------------------------------------------------------------------------------------------------------------------------------


/etc/nginx/conf.d/virtual.conf(8060 ssl 적용)

---------------------------------------------------------------------------------------------------------------------------------------------------

server {

    listen 8060 ssl;                                          // 8060 옆에 ssl 기입

    

    root /klpbx/callrabi/desk;

    ssl_certificate /etc/nginx/ssl/__hiqri_ai_cert.pem;      // 인증서 절대 경로 입력 

    ssl_certificate_key /etc/nginx/ssl/PrivateKeyUn.key;       // 인증서 절대 경로 입력

    index index.php;

---------------------------------------------------------------------------------------------------------------------------------------------------

#service nginx restart   ➡︎ 재시작





APATCHE



*apache ssl 적용

---------------------------------------------------------------------------------------------------------------------------------------------------

/etc/httpd/httpd.conf 또는 /etc/httpd/conf.d/virtual.conf 에 적용

  (아파치 인증서 사용하는 업체는 현재 웅진이고, 웅진 conf 참고 하시면 됩니다)

8070 설정 들어간 부분에 SSL Egnin on 부터 아래까지 삽입

DocumentRoot /klpbx/callrabi/8070

<Directory "/klpbx/callrabi/8070">

Options FollowSymLinks

AllowOverride AuthConfig

Order allow,deny

Allow from all

RewriteEngine On

RewriteCond %{HTTPS} !=on

RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

</Directory>

SSLEngine on

#SSLProtocol all -SSLv2

#SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW


## 위에서 생성한 SSL 인증서와 개인키


SSLCertificateFile /etc/httpd/conf/star_wjthinkbig_com_cert.pem          // 인증서 절대 경로 입력

SSLCertificateKeyFile /etc/httpd/conf/star_wjthinkbig_com_key.key       //인증서 절대 경로 입력

SSLCertificateChainFile /etc/httpd/conf/Chain_RootCA_Bundle.crt      //root 체인키 절대 경로 입력

---------------------------------------------------------------------------------------------------------------------------------------------------

virtual.conf 파일에 8060 설정 구문 있으면 똑같이 적용 필요

#service httpd restart   ➡︎ 재시작

고객센터
070-7919-8081

사용시 궁금한 내용이 있으시면 연락 주십시요.


mail to: support@klcns.co.kr