질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

chroot 상에서 ssl 인증서 설치

작성자 정보

  • 황영석 작성
  • 작성일

컨텐츠 정보

본문

이번에 멀티도메인용 2개를 구입했습니다.

두 서버에 각각 1개씩 설치했는데, chroot 가 적용되지 않은 서버에서는 제대로 설치되었으나, chroot 가 적용된 사이트에서는 에러가 발생합니다.

apache 2.2 버전
저장된 key 와 crt 파일이 저장된 위치 : /home/chroot/usr/local/apache/conf/ssl/


// 아파치 시작
# chroot /home/chroot/ /usr/local/apache/bin/apachectl start
--------------------------------------------------------------------
Apache/2.2.8 mod_ssl/2.2.8 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide the pass phrases.

Server www.mydomain.kr:443 (RSA)
Enter pass phrase:Apache:mod_ssl:Error: Private key not found.
**Stopped

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


// 로그 확인
# cat /home/chroot/usr/local/apache/logs/error_log
--------------------------------------------------------------------
[Fri Nov 27 22:09:54 2009] [error] Init: Private key not found
[Fri Nov 27 22:09:54 2009] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag
[Fri Nov 27 22:09:54 2009] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Fri Nov 27 22:09:54 2009] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
[Fri Nov 27 22:09:54 2009] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib
--------------------------------------------------------------------


// 아파치 ssl 파일내용
# cat /home/chroot/usr/local/apache/conf/extra/httpd-ssl.conf
--------------------------------------------------------------------
Listen 443

AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
SSLPassPhraseDialog  builtin
SSLSessionCache        "shmcb:/usr/local/apache/logs/ssl_scache(512000)"
SSLSessionCacheTimeout  300
SSLMutex  "file:/usr/local/apache/logs/ssl_mutex"

##
## SSL Virtual Host Context
##
NameVirtualHost xxx.xxx.xxx.xxx:443

<VirtualHost www.mydomain.kr:443>
ServerName www.mydomain.kr
DocumentRoot "/home/mydomain/public_html"

SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile "/usr/local/apache/conf/ssl/xxx.xxx.xxx.xxx.crt"
SSLCertificateKeyFile "/usr/local/apache/conf/ssl/xxx.xxx.xxx.xxx.key"
SSLCACertificateFile "/usr/local/apache/conf/ssl/xxx.xxx.xxx.xxx.ca-bundle"
SSLCACertificatePath "/usr/local/apache/conf/ssl/"

include "conf/ssl/ssl.conf"
</VirtualHost>

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

검색해보니 chroot 상에서 mod_ssl 때문에 발생하는 문제이고, 이거에 대한 명확한 해답은 도저히 찾질 못하겠네요.
제발 도움을 부탁드립니다.
감사합니다.




관련자료

댓글 2

장규승님의 댓글

  • 장규승
  • 작성일
SSLCertificateFile "/home/chroot/usr/local/apache/conf/ssl/xxx.xxx.xxx.xxx.crt"
SSLCertificateKeyFile "/home/chroot/usr/local/apache/conf/ssl/xxx.xxx.xxx.xxx.key"
SSLCACertificateFile "/home/chroot/usr/local/apache/conf/ssl/xxx.xxx.xxx.xxx.ca-bundle"

요렇게  FULL로 사용하면 어떻나요?

리온님의 댓글

  • 리온
  • 작성일
SSL 이전에 chroot 가 제대로 적용 되고 있는지 확인해보고,
적용되고 있다면 mod_ssl 이 엑세스 하는 인증서와 키 파일들의
퍼미션과 사용자 그룹을 확인해보세요.

공지사항


뉴스광장


  • 현재 회원수 :  60,034 명
  • 현재 강좌수 :  35,787 개
  • 현재 접속자 :  217 명