
| ・ |
ドキュメントセンターを初めてご利用する方や運営方針についての基本的な姿勢をご覧になりたい方へ。
|
| ご利用の皆様から多く寄せられる質問にお答えしています。 |
|
| ・ |
ディーエーオフィスなどが利用する用語に関する解説を行います。
|
|
|
 |
 |  |
Apache2 SSLインストール 基本 |
! インストール
cd /usr/local/src/httpd-2.2.3
./configure --enable-so --enable-ssl
make
make install
! 設定
cd /usr/local/apache2/conf
秘密鍵の生成
openssl genrsa -des3 -rand /var/log/messages -out www.example.com.pem 1024
CSR(証明書を認証してもらうための情報)
openssl req -new -key www.example.com.pem -out www.example.com.csr
以下、質問を受けるので答える
Enter pass phrase for www.example.com.pem:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:Hyogo
Locality Name (eg, city) []:Mikata
Organization Name (eg, company) [Internet Widgits Pty Ltd]:generationact
Organizational Unit Name (eg, section) []:tech management
Common Name (eg, YOUR name) []:www.example.com
Email Address []:example@example.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:********
An optional company name []:
証明書(とりあえず自サーバで発行)
openssl x509 -req -in www.example.com.csr -signkey www.example.com.pem -out www.example.com.crt
sslをincludeしているか確認
ee httpd.conf
以下の行を見つける・なければ追記
Include conf/extra/httpd-ssl.conf
ee ssl.conf
# 以下の2ファイルを最低読み込む必要がある・その他はそのままでとりあえず問題ない
---
SSLCertificateFile /usr/local/apache2/ssl/www.example.com.crt
SSLCertificateKeyFile /usr/local/apache2/ssl/www.example.com.pem
---
# apacheの起動
/usr/local/apache2/bin/apachectl start
上述でパスワードを聞かれて起動
# rcなどで自動起動時にパスワード入力するわけにいかないので以下の処理
mv www.example.com.pem www.example.com.pem.backup
openssl rsa -in www.example.com.pem.backup -out www.example.com.pem
---
httpdの古いバージョンでは下記のように記述されていることもある
Include conf/ssl.conf
startsslとはしない
httpdの新しいバージョンではstartsslとしなくても良いようだ。startと指定するだけでパスワードを聞かれる。
|
| 文書番号 |
00709 |
| 日付 |
2004.03.29 |
| 参照数 |
696 |
|