Apache 2.0.58 update

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

今年1月にFC3がLegacyになりアップデートが行われなくなって久しくプラットフォームの全面的なリニューアルも考えているところだが、取り敢えず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/

@IT http://www.atmarkit.co.jp/