March 13(Fri), 2009
HTTPS接続のための証明書作成方法(Apache2 + SSL) - Debian [Lenny]
とりあえずメモ.
# zless /usr/share/doc/apache2-doc/README.Debian.gz
SSL
===
Enabling SSL
------------
To enable SSL, type (as user root):
a2ensite default-ssl
a2enmod ssl
If you want to use self-signed certificates, you should install the ssl-cert
package (see below). Otherwise, just adjust the SSLCertificateFile and
SSLCertificateKeyFile directives in /etc/apache2/sites-available/default-ssl to
point to your SSL certificate. Then restart apache:
/etc/init.d/apache2 restart
Creating self-signed certificates
---------------------------------
If you install the ssl-cert package, a self-signed certificate will be
automatically created using the hostname currently configured on your computer.
You can recreate that certificate (e.g. after you have changed /etc/hosts or
DNS to give the correct hostname) as user root with:
make-ssl-cert generate-default-snakeoil --force-overwrite
To create more certificates with different host names, you can use
make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /path/to/cert-file.crt
This will ask you for the hostname and place both SSL key and certificate in
the file /path/to/cert-file.crt . Use this file with the SSLCertificateFile
directive in the apache config (you don't need the SSLCertificateKeyFile in
this case).
- 証明書の作成
# cd /etc/apache2/ssl # make-ssl-cert /usr/share/ssl-cert/ssleay.cnf apache.pem
# emacs /etc/apache2/sites-available/default-ssl
(前略)
SSLCertificateFile /etc/apache2/ssl/apache.pem
SSLCertificateKeyFile /etc/apache2/ssl/apache.pem
(後略)
いろんな情報に惑わされて設定にのべ4日くらいかかったぜ!
後でまとめ直す.
トラックバック - http://d.hatena.ne.jp/haru-s/20090313/1236961612
リンク元
- 111 http://www.google.co.jp/search?hl=ja&client=firefox-a&rls=org.mozilla:ja:official&hs=UjN&q=https+接続&btnG=検索&lr=lang_ja
- 84 http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF-8&rlz=1T4GGLG_jaJP310JP310&q=apache+ssl+debian+lenny
- 43 http://www.google.co.jp/url?sa=t&rct=j&q=make-ssl-cert&source=web&cd=2&ved=0CCUQFjAB&url=http://d.hatena.ne.jp/haru-s/20090313/1236961612&ei=cdSjTo2GOe7LmAW5wbycCQ&usg=AFQjCNEBypp4bvxA_yp-kcvQg0aSLxW8Iw&cad=rja
- 39 http://www.google.co.jp/search?hl=ja&client=firefox-a&hs=s4Q&rls=org.mozilla:ja:official&q=apache2+ssl+debian&aq=2&aqi=g10&aql=&oq=apache2+ssl
- 35 http://www.google.co.jp/search?hl=ja&lr=lang_ja&client=firefox-a&rls=org.mozilla:ja:official&hs=OSv&q=apache+ssl+証明書+作成&revid=1750945570&ei=sxvTSeLRBJmktAOqqLX2Cw&sa=X&oi=revisions_inline&resnum=0&ct=top-revision&cd
- 32 http://d.hatena.ne.jp/ema25/20110719/1311086374
- 30 http://www.google.co.jp/search?hl=ja&safe=off&client=firefox-a&rls=org.mozilla:ja:official&hs=9cG&num=100&q=debian+apache+ssl+lenny&btnG=検索&lr=lang_ja
- 26 http://ml.tietew.jp/cppll/cppll/article/13531
- 25 http://www.google.co.jp/url?sa=t&rct=j&q=https 証明書作成&source=web&cd=5&ved=0CFIQFjAE&url=http://d.hatena.ne.jp/haru-s/20090313/1236961612&ei=FXOuTuypLuTDmQWgos2fBQ&usg=AFQjCNEBypp4bvxA_yp-kcvQg0aSLxW8Iw
- 25 http://www.google.com/search?hl=ja&lr=lang_ja&ie=UTF-8&oe=UTF-8&q=Debian+Lenny+SSL+設定&num=50
