スマートフォン・ジン | Smartphone-Zine

引っ越し先→ https://smartphone-zine.com/

WindowsのApacheでSSLを有効にする

インストール方法です。
apache_2.2.4-win32-x86-no_ssl.msi
apache-2.2.4_openssl-0.9.8e.zip
を取ってきて、c:\tmpにおいた。

>cd c:\
>cd tmp
>msiexec /i apache_2.2.4-win32-x86-no_ssl.msi
Next>Next>Next>Next>Next>
Folder name: C:\Program Files\Apache Group\Apache2\
OK>Next>Install>Finish


>net stop Apache2
Apache2 サービスを停止中です.
Apache2 サービスは正常に停止されました。

C:\tmp>"C:\Program Files\Apache Group\Apache2\bin\httpd" -k uninstall
Removing the Apache2.2 service
The Apache2.2 service has been removed successfully.

>taskkill /im apachemonitor.exe
成功: プロセス "ApacheMonitor.exe" (PID 1036) は強制終了されました。


インストール済みのapacheを上書き。

>unzip -o -d "c:/Program Files/Apache Group" apache-2.2.4_openssl-0.9.8e.zip

>cacls "C:\Program Files\Apache Group\Apache2" /E /G SYSTEM:F /T

>"C:\Program Files\Apache Group\Apache2\bin\httpd" -D SSL -k install
Installing the Apache2.2 service
The Apache2.2 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
Syntax error on line 62 of C:/Program Files/Apache Group/Apache2/conf/extra/http
d-ssl.conf:
SSLSessionCache takes one argument, SSL Session Cache storage (`none', `nonenotn
ull', `dbm:/path/to/file')


エラーが出た・・・

C:/Program Files/Apache Group/Apache2/conf/extra/httpd-ssl.confの以下の箇所を修正
(")でくくってみた。

 62: SSLSessionCache        "shmcb:C:/Program Files/Apache Group/Apache2/logs/ssl_scache(512000)"
 80: ErrorLog "C:/Program Files/Apache Group/Apache2/logs/error_log"
 81: TransferLog "C:/Program Files/Apache Group/Apache2/logs/access_log"
 99: SSLCertificateFile "C:/Program Files/Apache Group/Apache2/conf/server.crt"
107: SSLCertificateKeyFile "C:/Program Files/Apache Group/Apache2/conf/server.key"
 >net start Apache2
Apache2 サービスを開始します.
Apache2 サービスは正常に開始されました。

https://127.0.0.1/を開いてIt works!と表示されればOK。