YANO's digital garage

Copyright ©YANO All rights reserved. https://www.bravotouring.com/~yano/

Last-modified: 2024-04-10 (水)


[一語一絵/IT系]

Apache 2.0.58 update / 2006-05-11 (木)

[External]Apache HTTP Servermod_imapに起因するクロスサイトスクリプティングの修正版、2.0.58と1.3.35がリリースされている。

今年1月に[External]FC3がLegacyになりアップデートが行われなくなって久しくプラットフォームの全面的なリニューアルも考えているところだが、取り敢えず[External]Apache HTTP Serverだけでも上げとかないといかんだろう。

という事で、久しぶりにsourceのtar-ballからビルドする。2.x系のビルドは初めてだったので、configureのレイアウトオプションが--with-leyoutから--enable-layoutに変っているとはつゆ知らず/usr/local/apache2に展開されてしまった。でもこれはこれで既存の環境を壊さずにおけるのでメリットがあり、/usr/local/apache2のままでいく方が良さそうだ。ライブラリモジュールをstatic linkでなくDSOとして構成するオプション--enable-mods-sharedだけを指定。

$ tar zxfv httpd-2.0.58.tar.gz
$ cd httpd-2.0.58
$ ./configure --enable-mods-shared=all
$ make && sudo make install
でビルド。後は、/etc/rc.d/init.d/httpdとconfファイルを手作業で修正してupdateするなり。

【補足】SSLが効いてなかったのでssl、ユーザーcgiで書き込みエラーが出る障害対応でsuexecのモジュールを追加。ついでにcache系モジュールも入れときましょうか。

$ tar zxfv httpd-2.0.58.tar.gz
$ cd httpd-2.0.58
$ ./configure --enable-mods-shared=all --enable-ssl=shared --enable-suexec=shared \
              --with-suexec-bin=/usr/local/apache2/bin/suexec --with-suexec-caller=apache \
              --enable-cache=shared --enable-disk-cache=shared \
              --enable-file-cache=shared --enable-mem-cache=shared
$ make && sudo make install
となる。あとhttpdのロケーションやオプションを変更するにあたっては/etc/rc.d/init.d/httpdの起動スクリプトに直接手を入れなくとも、/etc/sysconfig/httpd
# Configuration file for the httpd service.

#
# The default processing model (MPM) is the process-based
# 'prefork' model.  A thread-based model, 'worker', is also
# available, but does not work with some modules (such as PHP).
# The service must be stopped before changing this variable.
#
#HTTPD=/usr/sbin/httpd.worker
HTTPD=/usr/local/apache2/bin/httpd

#
# To pass additional options (for instance, -D definitions) to the
# httpd binary at startup, set OPTIONS here.
#
#OPTIONS=
OPTIONS=-DSSL

#
# By default, the httpd process is started in the C locale; to 
# change the locale in which the server runs, the HTTPD_LANG
# variable can be set.
#
#HTTPD_LANG=C
な具合に直せば良いのであった。まる。

【参照】
●JAPAN APACHE USERS GROUP http://www.apache.jp/
┣Apache HTTP Server 1.3.35 Released http://www.apache.org/dist/httpd/Announcement1.3.html
┣Apache HTTP Server 2.0.58 Released http://www.apache.org/dist/httpd/Announcement2.0.html
┣Apache HTTP Server 2.2.2 Released http://www.apache.org/dist/httpd/Announcement2.2.html
┗Downloading Apache - Japanized Apache Site http://www.apache.jp/misc/download.html
●@IT http://www.atmarkit.co.jp/
┗Apache 2.2でWebサイトをパフォーマンスアップ!http://www.atmarkit.co.jp/flinux/special/apache22/apache01.html 2006年3月14日