| 最近の更新 | |
|---|---|
| 夢
| 2025/10/21 |
| お出かけチェックリスト
| 2025/08/30 |
| 韓国
| 2025/08/18 |
| 音楽データをDisplayAudioで聞く
| 2025/08/18 |
| 飛行機はなぜ飛ぶか
| 2025/08/18 |
| 養老孟司
| 2025/08/18 |
| 駅探(3646)
| 2025/08/18 |
| 騙す方が悪いのか・騙される方が悪いのか?
| 2025/08/18 |
| 高麗神社
| 2025/08/18 |
| 鴨川シーワールド
| 2025/08/18 |
| 黒岩一美
| 2025/08/18 |
| 網野善彦
| 2025/08/18 |
| 縄文聖地巡礼
| 2025/08/18 |
| 老荘
| 2025/08/18 |
| 聖方位
| 2025/08/18 |
| 自分のためにやるからこそ、それがチームのためになる
| 2025/08/18 |
| 自転車
| 2025/08/18 |
| 自転車のライトに泣く
| 2025/08/18 |
| 落合史観の用語補足
| 2025/08/18 |
| 落合莞爾
| 2025/08/18 |
$ sudo a2enmod ssl $ sudo a2ensite default-ssl $ sudo /etc/init.d/apache2 restart
$ sudo a2enmod proxy $ sudo a2enmod proxy_http
ProxyPass /proxy/ http://BACKEND_HOST:PORT/PREFIX ProxyPassReverse /proxy/ http://BACKEND_HOST:PORT/PREFIX
$ sudo apt-get install ssl-cert # Ubuntu 10.04, 11.04 では不要
SSL 証明書のインストールは /usr/share/doc/apache2/README.Debian.gz を 参照の事。
$ cd /etc/apache2 $ sudo mkdir ssl $ sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
add following at /etc/apache2/ports.conf:
Listen 443
modify following at /etc/apache2/site-enabled/000-default:
|NameVirtualHost *:443 |NameVirtualHost *:80 | |<VirtualHost *:80> | : |</VirtualHost> | |<VirtualHost *:443> | SSLEngine on | SSLCertificateFile /etc/apache2/ssl/apache.pem | : |</VirtualHost>
$ sudo a2ensite default-ssl $ sudo a2enmod ssl $ /etc/init.d/apache2 restart
htdigest 認証のユーザ登録の方法:
$ sudo htdigest /etc/trac/htdigest 'Subversion Project' user
mod_ssl-2.8.16-1.3.29.tar.gz
$ cd apache_1.3.31/src/modules/ $ mkdir fastcgi $ cd fastcgi $ cp -r ../../../../mod_fastcgi-2.4.2/* .
./configure --with-apache=../apache_1.3.31
なお、OpenSSL は既に install したものを使用するので、$ export SSL_BASE=/opt/openssl
は必要ない。--with-ssl=../openssl-0.9.x
$ ./configure \
--prefix=/opt/apache_1.3.31 \
--enable-module=ssl \
--enable-module=rewrite --enable-shared=rewrite \
--activate-module=src/modules/fastcgi/libfastcgi.a \
--disable-rule=EXPATNOTE 1: mod_rewrite は、
といった拡張機能をサポートする。同一ホスト内で SSL と非SSL の間を 相対パスで指定できるようにするために必要。 NOTE 2: SOAP::Lite を入れた時に expat も入ったようだが、 これが Apache 付属の expat-lite と衝突しているのか、 このあとの make が error となる。<a href="document.html:SSL">
--disable-rule=EXPAT はそれを回避するオプション。
mod_ssl: SSL handshake failed (server nike.100acre.net:443,
client 192.168.0.10) (OpenSSL library error follows)
OpenSSL: error:14094412:SSL routines:SSL3_READ_BYTES:sslv3
alert bad certificate [Hint: Subject CN in certificate
not server name or identical to CA!?]というエラーが出る。これに数日はまった(-_-)。
# cd /opt/apache_1.3.31
# find . -exec chmod o-rwx {} \;
# find . -exec chown [MYNAME]:[MYNAME] {} \;
MinSpareServers 1 StartServers 1 Port 7000 User [MYNAME] Group [MYGROUP]
NOTE: umask をしておかないと、/opt/apache/logs/ に User が file を作成 できないようだ。$ umask 027 $ /opt/apache/bin/apachectl startssl
$ openssl x509 -inform pem -in x.crt -text
$ openssl genrsa -des3 -out ca.key 1024 Enter pass phrase for ca.key: ******* Verifying - Enter pass phrase for ca.key: *******
$ openssl req -new -x509 -days 365 -key ca.key -out ca.crt Enter pass phrase for ca.key: ******* : Country Name (2 letter code) [AU]:JP State or Province Name (full name) [Some-State]:Tokyo Locality Name (eg, city) []:Metro Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Company Organizational Unit Name (eg, section) []: Common Name (eg, YOUR name) []:ecample.com Email Address []:[MYNAME]@example.com
$ openssl genrsa -des3 -out server.key 1024 $ openssl rsa -in server.key -out server.key.unsecure $ openssl req -new -days 365 -key server.key.unsecure -out server.csr : Country Name (2 letter code) [AU]:JP State or Province Name (full name) [Some-State]:Tokyo Locality Name (eg, city) []:Metro Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Company Organizational Unit Name (eg, section) []: Common Name (eg, YOUR name) []:example.com Email Address []:[MYNAME]@example.com
$ /home/[MYNAME]/p/ext/openssl/sign.sh server.csr
$ scp server.crt [MYNAME]@[HOST]:/opt/apache/conf/ssl.crt/dip-server.crt $ scp server.key.unsecure [MYNAME]@[HOST]:/opt/apache/conf/ssl.key/dip-server.key.unsecure
SSLCertificateFile /opt/apache_1.3.29/conf/ssl.crt/dip-server.crt : SSLCertificateKeyFile /opt/apache_1.3.29/conf/ssl.key/dip-server.key.unsecure :
# /opt/apache/bin/apachectl stop # /opt/apache/bin/apachectl startssl
| 2004-08-19: | セキュリティ対策として Apache1.3.31, mod_ssl-2.8.19 に更新。 |
| 2004-04-07: | ? |
| 2003-07-22: | 作成 |