httpd.conf 파일에서
다음 예 및 지시문을 사용하여 SSL 가상 호스트 스탠자를 작성하십시오. LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
<IfModule mod_ibm_ssl.c>
Listen 443
<VirtualHost *:443>
SSLEnable
</VirtualHost> </IfModule>SSLDisable
KeyFile "c:/Program Files/IBM HTTP Server/key.kdb"
중요사항: Listen 지시문에
항상 포트가 포함된 주소를 지정합니다. 예를 들어, 기본 주소
0.0.0.0을 사용하여 httpd.conf에 Listen 지시문을 추가하여 IPv4 포트 443을
청취합니다.
Listen 0.0.0.0:443.
이 두 번째 예제는
단일 웹 사이트에서 SSL을 사용할 수 있으며 서버 이름이
비SSL(포트 80)에 대해 글로벌 범위에서 지정된 서버 이름과
다르다고 가정합니다. 두 호스트 이름 모두 별도의 IP 주소로
DNS(Domain Name Server)에 등록하고 두 IP 주소 모두 로컬 네트워크 인터페이스 카드에서
구성해야 합니다.
Listen 80
ServerName www.mycompany.com
<Directory "c:/Program Files/IBM HTTP Server/htdocs">
Options Indexes
AllowOverride None
order allow,deny
allow from all
<Directory>
DocumentRoot "c:/program files/ibm http server/htdocs"
DirectoryIndex index.html
<VirtualHost 192.168.1.103:80>
ServerName www.mycompany2.com
<Directory "c:/Program Files/IBM HTTP Server/htdocs2">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs2"
DirectoryIndex index2.html
</VirtualHost>
Listen 443
<VirtualHost 192.168.1.103:443>
ServerName www.mycompany2.com
SSLEnable
SSLClientAuth None
<Directory "c:/Program Files/IBM HTTP Server/htdocs2">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs2"
DirectoryIndex index2.html
</VirtualHost>
SSLDisable
KeyFile "c:/program files/ibm http server/key.kdb"
SSLV2Timeout 100
SSLV3Timeout 1000
이 세 번째 예에서는
여러 웹 사이트에서 SSL을 사용한다고 가정합니다. 모든 호스트 이름은 별도의 IP 주소로
DNS(Domain Name Server)에 등록해야 합니다.
또한 모든 IP 주소를 로컬 네트워크 인터페이스 카드에서 구성해야 합니다.
SSLServerCert 지시문을 사용하여 각 웹 사이트의 SSL 핸드쉐이크를 수행하는 동안
클라이언트 브라우저에 전달되는 키 데이터베이스 파일의 개인 서버 인증을 식별하십시오.
SSLServerCert 지시문을 정의하지 않으면, IBM HTTP Server는
키 데이터베이스 파일에서 "기본 키"로 표시된(*) 인증을
전달합니다. Listen 80
ServerName www.mycompany.com
<Directory "c:/Program Files/IBM HTTP Server/htdocs">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs"
DirectoryIndex index.html
<VirtualHost 192.168.1.103:80>
ServerName www.mycompany2.com
<Directory "c:/Program Files/IBM HTTP Server/htdocs2">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs2"
DirectoryIndex index2.html
</VirtualHost>
<VirtualHost 192.168.1.104:80>
ServerName www.mycompany3.com
<Directory "c:/Program Files/IBM HTTP Server/htdocs3">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs3"
DirectoryIndex index3.html
</VirtualHost>
Listen 443
<VirtualHost 192.168.1.102:443>
ServerName www.mycompany.com
SSLEnable
SSLClientAuth None
SSLServerCert mycompany
<Directory "c:/Program Files/IBM HTTP Server/htdocs">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs"
DirectoryIndex index.html
</VirtualHost>
<VirtualHost 192.168.1.103:443>
ServerName www.mycompany2.com
SSLEnable
SSLClientAuth None
SSLServerCert mycompany2
<Directory "c:/Program Files/IBM HTTP Server/htdocs2">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs2"
DirectoryIndex index2.html
</VirtualHost>
<VirtualHost 192.168.1.104:443>
ServerName www.mycompany3.com
SSLEnable
SSLClientAuth None
SSLServerCert mycompany3
<Directory "c:/Program Files/IBM HTTP Server/htdocs3">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs3"
DirectoryIndex index3.html
</VirtualHost>
SSLDisable
KeyFile "c:/program files/ibm http server/key.kdb"
SSLV2Timeout 100
SSLV3Timeout 1000