Lighttpd ( 단일도메인 ) SSL 인증서신규설치가이드. [ 고객센터 ] 한국기업보안. 유서트기술팀
1) 인증서만들기 [root@localhost ssl]# cat www.ucert.co.kr.key www.ucert.co.kr.crt >www.ucert.co.kr.pem // 설명 : 발급받은인증서 / 개인키파일을한파일로저장합니다. ( 저장방법 : cat [ 개인키파일 ] [ 인증서파일 ] > [ 개인키 + 인증서파일 ] 먼저특정폴더에인증서를복사합니다. ( 예 ) /etc/lighttpd/ssl/ 2) SSL 환경설정 [root@localhost lighttpd]# vi lighttpd.conf // 설명 : lighttpd 환경파일수정 $HTTP["host"]=~"www.ucert.co.kr" { server.document-root = "/srv/www/htdocs" index-file.names += ( "index.html", "index.xhtml", "index.htm", "default.htm", "index.php" ) } #### CGI module #cgi.assign = ( ".pl" => "/usr/bin/perl", # ".cgi" => "/usr/bin/perl" ) # #### SSL engine $SERVER["socket"] == ":443" { // 설명 : SSL 서비스포트설정 ssl.engine = "enable" // 설명 : SSL 서비스활성화설정 ssl.pemfile = "/usr/local/lighttpd/conf/ssl/www.ucert.co.kr.pem" // 설명 : 인증서 + 개인키경로설정 ssl.ca-file = "/usr/local/lighttpd/conf/ssl/www.ucert.co.kr.ca-bundle" // 설명 : CA 인증서경로설정 server.name = www.ucert.co.kr // 설명 : 도메인명 server.document-root = "/srv/www/vhosts/ucert/" index-file.names += ( "index.html", "index.xhtml", "index.htm", "default.htm", "index.php" ) // 설명 : 홈디렉토리 }
3) lighttpd 재기동 [root@localhost conf]# /etc/rc.d/init.d/lighttpd restart lighttpd 를정지중 : [ OK ] lighttpd ( 을 ) 를시작중 : Enter PEM pass phrase: [ 개인키패스워드입력 ] [ OK ] [root@localhost conf]# 4) 인증서만료일확인 [root@localhost ~]# netstat -nap grep httpd tcp 0 0 :::80 :::* LISTEN 19301/lighttpd tcp 0 0 :::443 :::* LISTEN 19301/lighttpd // 설명 :443 포트 Listen 된상태에서아래의명령어를사용하여로컬에서인증서를확인합니 다. 인증서만료일확인방법 [root@mail ~]# openssl s_client -connect localhost:443 < /dev/null 2>&1 openssl x509 -noout -enddate notafter=jan 01 21:38:20 2016 GMT // 설명 : 로컬에서인증서출력이정상적이고외부에서 https://[ 도메인 ] 으로브라우저접속 시통신이되지않을경우내부방화벽 ( 예. iptables), 외부방화벽등에 SSL 포트가 Allow ( 또는
5) 인증서확인 [root@localhost ~]# openssl s_client -connect 127.0.0.1:443 openssl x509 depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA verify error:num=20:unable to get local issuer certificate -----BEGIN CERTIFICATE----- MIIE2jCCA8KgAwIBAgICD/cwDQYJKoZIhvcNAQEFBQAwPDELMAkGA1UEBhMCVVMx FzAVBgNVBAoTDkdlb1RydXN0LCBJbmMuMRQwEgYDVQQDEwtSYXBpZFNTTCBDQTAe Fw0xMDEyMTQxMDQ4NTlaFw0xMjAyMTUyMTM4MjBaMIHlMSkwJwYDVQQFEyBrdW9u SXgyYmI0a0lxZGpvWWE1bklYQWRxNVl6dG9RUDELMAkGA1UEBhMCS1IxGDAWBgNV BAoTD3d3dy51Y2VydC5jby5rcjETMBEGA1UECxMKR1Q1NDc2OTQxMDExMC8GA1UE CxMoU2VlIHd3dy5yYXBpZHNzbC5jb20vcmVzb3VyY2VzL2NwcyAoYykxMDEvMC0G A1UECxMmRG9tYWluIENvbnRyb2wgVmFsaWRhdGVkIC0gUmFwaWRTU0woUikxGDAW AQoCggEBAMl6qA1dEc/FKw2qSjlh0iZDVGp+zqjBXW/iwkcnEZCzy/wxauh85OwM G4TZ2FhJQabssuyVocWJGE/Fq3sO6U6lYZwycUKWN45sZTLGhdCbC0ZSb0OUq7tx A8pDSqH/2/kG8a/Yfn8zGmXgsWi5swgfPKIa7dcmnmglA1x4YDquo0npWMizgt2z mqqcuy5s/qkcdzo5ee1bxas4d7zhixzw5w9sdtsqo1no37glhtpnhiqrynzn4ay7 l0fhlxiwei2o/gndd4z4/rr0loftdemstspqlirtag/+8/tmo+boxhmpftuwynab MShN1eti+c0qWGsHigjvXMWtyg0NT4UCAwEAAaOCATowggE2MB8GA1UdIwQYMBaA FGtpPWoYQkrdjwJlOf01JIZ4kRYwMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAU BggrBgEFBQcDAQYIKwYBBQUHAwIwJwYDVR0RBCAwHoIPd3d3LnVjZXJ0LmNvLmty ggt1y2vydc5jby5rcjbdbgnvhr8epda6mdignqa0hjjodhrwoi8vcmfwawrzc2wt Y3JsLmdlb3RydXN0LmNvbS9jcmxzL3JhcGlkc3NsLmNybDAdBgNVHQ4EFgQUkHru EM3YsHLS8SjMWr7kBkyKu/YwDAYDVR0TAQH/BAIwADBJBggrBgEFBQcBAQQ9MDsw OQYIKwYBBQUHMAKGLWh0dHA6Ly9yYXBpZHNzbC1haWEuZ2VvdHJ1c3QuY29tL3Jh cglkc3nslmnyddanbgkqhkig9w0baqufaaocaqeacjr0kr5mna8gjfhz4grhsfvd N2WX88pZPtE0BlEOU18HLLg8xL5Bb8exvX5+sExHS9zasRHUIPAYpwALSf4/WP7M 96ZMAEAggR9Dt8pCyFO7QXgkB3QQ7EsEK+s01wSWxMN5/ZcSV7O0k/DF83DH118x /DFVeGNJsbwC0BEzVe/HnmBo77dxCdG+M16R59s2BjEr9Lq9sNnnE3drqs51qrs+ T0CyUWSpZ9KhlwjcLCMKe/SY8WIXIYaAx+IqJ7XJQU+GV1AJP3zHldhngL7eMMFo ROpAHbjfkI0XboRtTAVs0K46omCAA4JViVF1DDKaXPZ+swif4GlzY/ijwPLDkA== -----END CERTIFICATE-----
웹페이지에서의인증서확인방법 익스플로러확인방법 https://www.ucert.co.kr 접속예 도메인접속후에 Alt 키를누르고파일 속성 인증서클릭후인증서보기를선택하시면인증서정보를확인할수있습니다. 발급대상과유효기간이맞는지 확인합니다.