04/03: Apache + SSL 設定
Copy the files ssleay32.dll and libeay32.dll from the OpenSSL folder to WINNT\System32.
You also need to download openssl.cnf into the same folder where you unzipped OpenSSL.
Download ssl.conf and place it in the Apache2/conf directory.
C:\Documents and Settings\HOsako>cd c:\Openssl
C:\Openssl>openssl req -config openssl.cnf -new -out my-server.csr
C:\Openssl>openssl rsa -in privkey.pem -out my-server.key <-- Delete passphrase
C:\Openssl>openssl x509 -in my-server.csr -out my-server.cert -req -signkey my-server.key -days 3650 <-- optional
Open the httpd.conf file and locate the LoadModule directives. Add
LoadModule ssl_module modules/mod_ssl.so
After </IfModule> add
#SSLMutex default
SSLRandomSeed startup builtin
SSLSessionCache none
In the VirtualHost directives add
<VirtualHost www.my-domain.com:443>
SSLEngine On
SSLCertificateFile C:/Openssl/my-server.cert
SSLCertificateKeyFile C:/Openssl/my-server.key
</VirtualHost>
Change ssl.conf
DocumentRoot "C:/Apache2/htdocs"
ServerName COMPUTER.local:443
ServerAdmin xxxxx@xxxxxx.com.au
SSLCertificateFile C:/Openssl/my-server.cert
SSLCertificateKeyFile C:/Openssl/my-server.key
You also need to download openssl.cnf into the same folder where you unzipped OpenSSL.
Download ssl.conf and place it in the Apache2/conf directory.
C:\Documents and Settings\HOsako>cd c:\Openssl
C:\Openssl>openssl req -config openssl.cnf -new -out my-server.csr
C:\Openssl>openssl rsa -in privkey.pem -out my-server.key <-- Delete passphrase
C:\Openssl>openssl x509 -in my-server.csr -out my-server.cert -req -signkey my-server.key -days 3650 <-- optional
Open the httpd.conf file and locate the LoadModule directives. Add
LoadModule ssl_module modules/mod_ssl.so
After </IfModule> add
#SSLMutex default
SSLRandomSeed startup builtin
SSLSessionCache none
In the VirtualHost directives add
<VirtualHost www.my-domain.com:443>
SSLEngine On
SSLCertificateFile C:/Openssl/my-server.cert
SSLCertificateKeyFile C:/Openssl/my-server.key
</VirtualHost>
Change ssl.conf
DocumentRoot "C:/Apache2/htdocs"
ServerName COMPUTER.local:443
ServerAdmin xxxxx@xxxxxx.com.au
SSLCertificateFile C:/Openssl/my-server.cert
SSLCertificateKeyFile C:/Openssl/my-server.key