内容へ移動
ぽかんらぼ@DokuWiki
現在位置:
Top
»
Linux
»
CentOS
»
SSL導入
文書の表示
管理
サイトマップ
ログイン
検索
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== SSL導入 ====== SSL(オレオレ証明書)を導入する手順。 ===== SSLの有効化 ===== <sxh> $ sudo yum -y install mod_ssl </sxh> ===== Apacheの再起動 ===== <sxh> $ sudo service httpd restart </sxh> <note>ここから下はUbuntuのまま</note> ===== 証明書と秘密鍵の発行 ===== <sxh bash> $ sudo mkdir /etc/httpd/ssl/ $ sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/httpd/ssl/cert-file.crt </sxh> 何度かダイアログが表示されるが全部Enterでのりきる。 ===== 設定 ===== 標準の設定ファイルをコピーし編集する。 <sxh bash> $ sudo cp -p /usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-ssl.conf.gz /etc/apache2/sites-available/ $ sudo gunzip /etc/apache2/sites-available/httpd-ssl.conf.gz $ sudo gedit /etc/apache2/sites-available/httpd-ssl.conf </sxh> <sxh php; title: /etc/apache2/sites-available/httpd-ssl.conf> #Listen 443 <= コメントアウト DocumentRoow "/var/www" SSLCertificateFile "/etc/apache2/ssl/cert-file.crt" SSLCertificateKeyFile "/etc/apache2/ssl/cert-file.crt" </sxh> 設定を反映 <sxh bash> $ sudo a2ensite httpd-ssl.conf </sxh> ===== Apache2を再起動 ===== <sxh bash> $ sudo /etc/init.d/apache2 restart </sxh> ===== 動作確認 ===== https://localhost/p2-php/rep2\\ 自己証明書(オレオレ証明書)のため、警告メッセージが表示されるので許可する。 {{tag>Linux CentOS Apache2 SSL}}
文書の表示
以前のリビジョン
メディアマネージャー
文書の先頭へ