UNIX/Apache HTTP Server 2.0.x のバックアップ(No.1)
- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- ソース を表示
- UNIX/Apache HTTP Server 2.0.x へ行く。
- 1 (2005-05-04 (水) 06:33:54)
- 2 (2007-02-15 (木) 10:53:16)
apache2 2.0.53
通常
apt-get install openssl apt-get install libssl-dev OPTIM="-O2" ./configure --prefix=/usr/local/apache2-2.0.53 --enable-so --enable-ssl make make install cd /usr/local ln -s apache2-2.0.53 apache2 LanguagePriorityのjaを先頭に移動する AddDefaultCharsetにnoneを設定する
全てmodule
allを指定すると本当に全部(Order等も)moduleになってしまう。
./configure --enable-so \ --enable-modules=all \ --enable-mods-shared=all
proxy付き
./configure --prefix=/usr/local/apache2 \ --enable-so \ --enable-cache=shared \--enable-disk-cache=shared \ --enable-mem-cache=shared \ --enable-file-cache=shared \ --enable-proxy=shared \ --enable-proxy_connect=shared \ --enable-rewrite=shared
このエラーがでた場合、/etc/ld.so.confに/usr/local/libを追記してからldconfigを実行する。
/usr/local/apache2-2.0.53/bin/httpd: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
logrotate
/var/log/apache2/access_log /var/log/apache2/error_log /var/log/apache2/ssl_request_log /var/log/apache2/ssl_engine_log /var/log/apache2/suexec_log {
weekly
rotate 5
compress
missingok
sharedscripts
postrotate
/bin/kill -HUP `cat /usr/local/apache2/logs/httpd.pid 2> /dev/null` 2> /dev/null
endscript
}
起動スクリプト
#!/bin/bash
#
# chkconfig: 345 98 02
# description: apache2
#
# Startup script for Apache Web Server
#
# ----- Save and Set Environment Variables --------------------------------
PROGDIR=/usr/local/apache2/bin
# ----- Define Function ---------------------------------------------------
start() {
echo -n $"Starting apache2: "
${PROGDIR}/apachectl start
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo -e " \033[1m[\033[32m OK \033[37m]\033[0m"
else
echo -e " \033[1m[\033[31m NG \033[37m]\033[0m"
fi
}
stop() {
echo -n $"Stopping apache2: "
${PROGDIR}/apachectl stop
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo -e " \033[1m[\033[32m OK \033[37m]\033[0m"
else
echo -e " \033[1m[\033[31m NG \033[37m]\033[0m"
fi
}
# ----- Execute The Requested Command -------------------------------------
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
ホーム
一覧
単語検索
最終更新
ヘルプ