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

KAWANO's PukiWiki Plus! - Install Log/CentOS6/mod_ssl のバックアップ(No.1)

AND OR
  • バックアップ一覧
  • 差分 を表示
  • 現在との差分 を表示
  • 現在との差分 - Visual を表示
  • ソース を表示
  • Install Log/CentOS6/mod_ssl へ行く。
    • 1 (2014-03-20 (木) 19:02:22)

Apacheへのmod_sslの設定

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

▲ ▼

サーバの秘密鍵の作成

適当なパスフレーズを入力して、秘密鍵を作成する。

# cd /etc/pki/tls/certs
# make server.key

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

# openssl rsa -in server.key -out server.key
▲ ▼

サーバ用証明書の作成

ここで「オレオレ証明書」を作成する(汗)

# 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
▲ ▼

SSLの設定

設定ファイルに、作成した秘密鍵と証明書を設定する。

# 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
▲ ▼

サーバを再起動

設定を反映させるため、サーバを再起動する。

# service httpd restart
▲ ▼

参考

  • http://centossrv.com/apache-ssl.shtml
  • http://www.server-world.info/note?os=ce5&p=web&f=3

メニュー

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

大学関係リンク

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

今日の5件
  • FrontPage(280)
  • Java(3)
  • Lecture/CompPracC32005/10th(3)
  • Lecture/CompPracC2005/14th/1st(3)
  • Lecture/CompPracE2004/10thExercise(2)
最新の5件
2016-04-08
  • Lecture/timetable_2016
  • Lecture
  • FrontPage
2015-09-30
  • Lecture/timetable_2015
2015-04-04
  • MenuBar

total: 1207
today: 2
yesterday: 0
now: 4


リロード   差分   ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新の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 0.334 sec.
Valid XHTML 1.1