반응형

참고 사이트 : http://14.0.82.81/wiki.php/DocbookSgml/SSL-RedHat-HOWTO


비밀키 생성.

openssl genrsa -out file.key 1024


자필 서명 인증서 생성.

openssl req -new -key file.key -x509 -out file.crt


virtual host 정의.

NameVirtualHost *:443

<VirtualHost *:443>

SSLEngine on

SSLCertificateFile /etc/httpd/conf/server.crt

SSLCertificateKeyFile /etc/httpd/conf/server.key

CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

DocumentRoot /home/xxx/root

</VirtualHost>


아파치 재 구동.

service httpd restart


아래와 같은 에러 발생시 조치 사항.

Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/httpd.conf:

Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration


해결 : yum install mod_ssl(Cent OS 환경)

 - /etc/httpd/modules/mod_ssl.so 파일이 설치가 된다.



반응형

+ Recent posts