다수 인증서 설치 방법

여러개의 인증서를 한서버에서 사용할 때

[warn] VirtualHost www.xxx.kr:443 overlaps with VirtualHost www.xxx.com:443, the first has precedence, perhaps you need a NameVirtualHost directive

 또는

NameVirtualHost www.xxx.com:443 has no VirtualHosts

같이 나타 난다면 아래와 같이 여러개의 포트를 사용하여 인증서를 사용해 보세요.

iptables 나 포트 관련 방화벽을 사용하신다면 역시 사용하실 포트를 풀어 주세요~!


멀티 도메인 인증서라는것도 있으니 살펴 보시기 바랍니다.



■ Conf 파일수정

설치환경
Apache 1.x, 2.x, 2.2.x 에서 설정
www.test.com, www.test2.com 두개의 인증서 설치하기
Httpd.conf 환경설정
(2.x 에선 ssl.conf
 2.2.x 에선 httpd-ssl.conf)
- Virtualhost 로 하나의 ip에 두개의 인증서 설정(두개의 포트 필요)
/usr/local/apache/conf/httpd.conf 에서 설정(2.x 에선 ssl.conf, 2.2.x 에선 httpd-ssl.conf)
 
1. 두 개의 Key 값과 Cert 인증서 저장(다른 폴더에 저장)
/usr/local/apache/conf/ssl/test
/usr/local/apache/conf/ssl/test2
에 저장.
  httpd.conf 파일에서 관련부분 수정(2.x 에선 ssl.conf, 2.2.x 에선 httpd-ssl.conf)
- key.pem 파일과 cert.pem 파일 설정 후 체인인증서 추가

시큐어인증서의 경우
 SSLCACertificateFile/usr/local/apache/conf/ssl/secureCA.pem

글로벌인증서의 경우
 SSLCACertificateFile/usr/local/apache/conf/ssl/intermediate.pem


Ex.) www.test.com, www.test2.com
Ip : 192.168.0.2
3. conf 파일 수정.(아래화면)

■ Conf 파일수정

 

<ifDefine SSL>

Listen 443

Listen 444

- 443과 444 두개의 포트 Listen

</ifDefine>

NameVirtualHost 192.168.10.12:443

NameVirtualHost 192.168.10.12:444

- NameVirtualHost 로 포트를 잡아준다.

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

<VirtualHost _default_:443>

DocumentRoot "/xxx/html" (홈디렉토리)
ServerName www.test.com:443 (인증서 URL)
ServerAdmin admin@xxx.co.kr

SSLCertificateFile /usr/local/apache/conf/ssl/test/cert.pem (인증서 파일 설정)
SSLCertificateKeyFile /usr/local/apache/conf/ssl/test/key.pem (키 파일 설정)
SSLCACertificateFile /usr/local/apache/conf/ssl/intermediate.pem
(글로벌 인증서의 경우)
SSLCACertificateFile /usr/local/apache/conf/ssl/secureCA.pem
(시큐어 인증서의 경우)

</VirtualHost>


<VirtualHost _default_:444>

DocumentRoot "/xxx2/html" (홈디렉토리)
ServerName www.test2.com:444(인증서 URL)
ServerAdmin admin@xxx.co.kr

SSLCertificateFile /usr/local/apache/conf/ssl/test2/cert.pem (인증서 파일 설정)
SSLCertificateKeyFile /usr/local/apache/conf/ssl/test2/key.pem (키 파일 설정)
SSLCACertificateFile /usr/local/apache/conf/ssl/intermediate.pem
(글로벌 인증서의 경우)
SSLCACertificateFile /usr/local/apache/conf/ssl/secureCA.pem
(시큐어 인증서의 경우)
</VirtualHost>

■ Conf 수정화면

▶ 가상호스트 두개의 포트별 인증서 설정 완료.
4. 아파치 재구동
$ apachectl stop
$ apachectl startssl (2.2.x에선 apachectl start)
5. 웹페이지에서 확인 (해당 https://URLhttps://URL:444 확인)
출처 : http://www.crosscert.com/service_global ··· tall.htm
2009/06/10 03:10 2009/06/10 03:10
Posted by x2chi

트랙백 보낼 주소 : http://www.x2chi.com/trackback/474

댓글을 달아주세요


Total : 871112
Today : 185 Yesterday : 746
BLOG main image
Leading the Web to its Full Potential... (웹의 모든 잠재력을 이끌어 내기 위하여...) by x2chi

카테고리

전체 (673)
내 이야기 (204)
관심거리들 (154)
웹&컴퓨팅 (197)
(주) 프로홈 (21)
웨딩정보 (88)
건강 (7)
Creative Commons License

이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.