Server/CentOS

보안서버구축 4. 개인키 패스워드 자동입력

손가락귀신 2012. 2. 28. 00:03

Apache 시작시 개인키 패스워드 자동입력

보안서버 구축 후에는 apache 를 구동할 때 개인 키 패스워드를 입력해야 합니다.
apache 구동시 스크립트를 실행하여 패스워드를 자동으로 입력되게 할 수 있습니다.

# /etc/init.d/httpd start
Apache/2.2.22 mod_ssl/2.2.22 (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 secure.oops4u.com:443 (RSA)
Enter pass phrase:

OK: Pass Phrase Dialog successful.



1. Apache 설정 파일 (mod_ssl)

# vi /usr/local/httpd/conf/extra/httpd-ssl.conf
#SSLPassPhraseDialog  builtin
SSLPassPhraseDialog  exec:/usr/local/httpd/conf/ssl/pass.sh


2. 패스워드 쉘스크립트 생성

# vi /usr/local/httpd/conf/ssl/pass.sh
#!/bin/sh
echo 'password'


3. 실행권한 부여

# chmod a+x /usr/local/httpd/conf/ssl/pass.sh


4. Apache 재시작