Server

윈도우 개발환경에 ssl 구성하기 apache

soccerda 2019. 5. 3. 14:00
반응형

openssl-0.9.8k_WIN32.zip
1.25MB
openssl-0.9.8k_X64.zip
1.42MB

로컬 환경에 ssl 테스트를 하기 위해 아파치 설정을 진행하였음.

 

1. openssl 설치 

 

http://code.google.com/p/openssl-for-windows/downloads/list 

 

컴퓨터에 맞는 버전을 다운받고

 

압축을 풀고, 압축 푼 폴더를 C:\로 옮겨줍니다.

 

c:\ > cd openssl--0.9.8k_X64

c:\openssl--0.9.8k_X64 > cd bin

c:\openssl--0.9.8k_X64\bin > openssl

 

 

 

2. 파일 생성

openssl 설정 key, csr, crt 생성

key 생성
openssl genrsa -des3 -out soccerda.key 1024

key 상태 확인
openssl rsa -noout -text -in soccerda.key

csr생성
openssl req -new -days 365 -key soccerda.key -out soccerda.csr -config ../openssl.cnf

csr확인
openssl req -noout -text -in soccerda.csr

crt생성
openssl x509 -req -days 365 -in soccerda.csr -signkey soccerda.key -out soccerda.crt

 

혹시나

Init: SSLPassPhraseDialog builtin is not supported on Win32 (key file :~~

에러가 발생한다면 


openssl  rsa -in soccerda.key -out soccerda.key 

 

윈도우용 아파치는 패스워드가 있으면 에러

 

 

3. httpd.conf 설정

  a. LoadModule ssl_module modules/mod_ssl.so

  b. Include conf/extra/httpd-ssl.conf

  c. LoadModule socache_dbm_module modules/mod_socache_dbm.so

  d. LoadModule socache_memcache_module modules/mod_socache_memcache.so

  e. LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

 

4. extra/httpd-ssl.conf

  a. SSLSessionCache        "shmcb:c:/Apache24/logs/ssl_scache(512000)" 
  b. SSLSessionCacheTimeout  300

  c. VIrtualHost 부분 설정

DocumentRoot "C:\Apache24\htdocs\프로젝트" 
ServerName www.soccerda.co.kr:443

SSLCertificateFile "c:/Apache24/conf/www.soccerda.co.kr.crt"

SSLCertificateKeyFile "c:/Apache24/conf/www.soccerda.co.kr.key"

 

5. 서버 재시작

반응형