[ ホーム | 一覧 | 検索 | 最終更新 | ヘルプ ] [ 新規 ]

KAWANO's PukiWiki Plus! - Install Log/CentOS6/mod_ssl の変更点

Top > Install Log > CentOS6 > mod_ssl
AND OR
  • 追加された行はこの色です。
  • 削除された行はこの色です。
  • Install Log/CentOS6/mod_ssl へ行く。

TITLE:Apacheへのmod_sslの設定
*Apacheへのmod_sslの設定 [#u50b63b0]

あまりお勧めではないが、
通称「オレオレ証明書」でSSLを使った暗号化通信ができるようにする。

**サーバの秘密鍵の作成 [#l1e97f7c]
適当なパスフレーズを入力して、秘密鍵を作成する。
 # cd /etc/pki/tls/certs
 # make server.key

あと、このままだとサーバの再起動時に、パスフレーズの入力が必要になる。
そこで、次のようにして、パスフレーズを入力しなくてもいいようにする。
 # openssl rsa -in server.key -out server.key

**サーバ用証明書の作成 [#d5249132]
ここで「オレオレ証明書」を作成する(汗)
 # make server.crt
 umask 77 ; \
         /usr/bin/openssl req -utf8 -new -key server.key -x509 -days 365 -out
    server.crt -set_serial 0
 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) [GB]:JP
 State or Province Name (full name) [Berkshire]:Hyogo
 Locality Name (eg, city) [Newbury]:Kakogawa
 Organization Name (eg, company) [My Company Ltd]:Hoge Ltd
 Organizational Unit Name (eg, section) []:
 Common Name (eg, your name or your server's hostname) []:hogehoge.hoge.ac.jp
 Email Address []:webmaster@hogehoge.hoge.ac.jp

証明書の有効期限を延ばす(この場合は10年)。
 # openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 3650

**SSLの設定 [#l79a7058]
設定ファイルに、作成した秘密鍵と証明書を設定する。
 # vi /etc/httpd/conf.d/ssl.conf

内容は次のとおり。
 DocumentRoot "/var/www/html" ←コメントを削除
 ...
 SSLCertificateFile /etc/pki/tls/certs/server.crt
 SSLCertificateKeyFile /etc/pki/tls/certs/server.key

**サーバを再起動 [#a50cc788]
設定を反映させるため、サーバを再起動する。
 # service httpd restart

***参考 [#b679cd45]
-http://centossrv.com/apache-ssl.shtml
-http://www.server-world.info/query?os=CentOS_6&p=ssl

メニュー

  • トップ
  • 授業
  • PukiWiki Log
  • Install Log
  • 道具箱
  • セキュリティ情報
  • RSSアンテナ

大学関係リンク

  • Webメール
  • 健康システム学科
  • 情報メディアセンター
  • 兵庫大学

今日の5件
  • FrontPage(33)
  • Lecture/CompPracC32005/10th(1)
  • Lecture/CompPracC2005/8th/example(1)
  • Lecture/CompPracR2004/11th(1)
  • Lecture/CompPracC2006/11th(1)
最新の5件
2016-04-08
  • Lecture/timetable_2016
  • Lecture
  • FrontPage
2015-09-30
  • Lecture/timetable_2015
2015-04-04
  • MenuBar

total: 1206
today: 1
yesterday: 0
now: 11


リロード   差分   ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS
http%3A%2F%2Fhs-www.hyogo-dai.ac.jp%2F~kawano%2F%3FInstall%252520Log%25252FCentOS6%25252Fmod_ssl
Founded by Minoru Kawano.
Powered by PukiWiki Plus! 1.4.7plus-u2-i18n. HTML convert time to 2.461 sec.
Valid XHTML 1.1