- 追加された行はこの色です。
- 削除された行はこの色です。
* apache2 2.0.53 [#yad479f1]
通常
* UNIX/Apache HTTP Server 2.0.x [#d0a980b3]
** Debian [#h88386aa]
apt-get install openssl
apt-get install libssl-dev
** 共通 [#c245bfdb]
OPTIM="-O2"
./configure --prefix=/usr/local/apache2-2.0.53 --enable-so --enable-ssl
./configure --prefix=/usr/local/apache-2.0.x --enable-so --enable-ssl
make
make install
cd /usr/local
ln -s apache2-2.0.53 apache2
ln -s apache-2.0.x apache-2.0
LanguagePriorityのjaを先頭に移動する
AddDefaultCharsetにnoneを設定する
~
全てmodule
# allを指定すると本当に全部(Order等も)moduleになってしまう。
./configure --enable-so \
--enable-modules=all \
--enable-mods-shared=all
~
proxy付き
./configure --prefix=/usr/local/apache2 \
./configure --prefix=/usr/local/apache-2.0 \
--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
/usr/local/apache-2.0.x/bin/httpd: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
** logrotate [#h2f42f03]
/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 {
/var/log/apache-2.0/access_log /var/log/apache-2.0/error_log /var/log/apache-2.0/ssl_request_log /var/log/apache-2.0/ssl_engine_log /var/log/apache-2.0/suexec_log {
missingok
weekly
rotate 5
rotate 53
compress
missingok
delaycompress
compresscmd /usr/bin/bzip2
uncompresscmd /usr/bin/bunzip2
compressext .bz2
notifempty
create 640 root www-data
sharedscripts
postrotate
/bin/kill -HUP `cat /usr/local/apache2/logs/httpd.pid 2> /dev/null` 2> /dev/null
/bin/kill -HUP `cat /usr/local/apache-2.0/logs/httpd.pid 2> /dev/null` 2> /dev/null
endscript
}
** 起動スクリプト [#dcc4fe73]
#!/bin/bash
#
# chkconfig: 345 98 02
# description: apache2
# description: apache20
#
# Startup script for Apache Web Server
#
# ----- Save and Set Environment Variables --------------------------------
PROGDIR=/usr/local/apache2/bin
PROGDIR=/usr/local/apache-2.0/bin
# ----- Define Function ---------------------------------------------------
start() {
echo -n $"Starting apache2: "
echo -n $"Starting apache-2.0: "
${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: "
echo -n $"Stopping apache-2.0: "
${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