7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Open SSLの設定 (windows apache) めも

Posted at

■Open SSLの設定

1.環境変数(Path)の設定をする
 → openssl.exeのパスを追加する
 例)C:\Program Files\Apache Software Foundation\Apache2.2\binを追加

2.環境変数(OPENSSL_CONF)の設定をする
 → 新規にOPENSSL_CONFを作成する
 例)C:\Program Files\Apache Software Foundation\Apache2.2\conf\openssl.cnf

3.秘密鍵(server.key)の生成
 # openssl genrsa -des3 -out ./ssl.key/server.key 2048

4.公開鍵(server.csr)の生成
 # openssl req -new -key ./ssl.key/server.key -out ./ssl.key/server.csr

5.証明書(server.crt)の生成
 # openssl x509 -in ./ssl.key/server.csr -out ./ssl.key/server.crt -req -signkey ./ssl.key/server.key -days 365

6.秘密鍵のパスワードを解除する
 → windows版だとパスワードがついているとapacheが起動できないため
 # openssl rsa -in ./ssl.key/server.key -out ./ssl.key/nopass_server.key

7.httpd.confの修正
 → 以下のモジュールを有効にする
 LoadModule ssl_module modules/mod_ssl.so
 Include conf/extra/httpd-ssl.conf

8.httpd-ssl.confの修正
 → 証明書のファイル名をnopass_server.keyに変更する
 SSLCertificateFile <証明書ファイルの場所>
 SSLCertificateKeyFile <秘密鍵ファイルの場所>

7
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?