UNIX/Apache HTTP Server 2.0.x
UNIX/Apache HTTP Server 2.0.x
Debian
apt-get install openssl apt-get install libssl-dev
共通
OPTIM="-O2" ./configure --prefix=/usr/local/apache-2.0.x --enable-so --enable-ssl make make install cd /usr/local 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/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/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
/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 53 compress 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/apache-2.0/logs/httpd.pid 2> /dev/null` 2> /dev/null endscript }
起動スクリプト
#!/bin/bash # # chkconfig: 345 98 02 # description: apache20 # # Startup script for Apache Web Server # # ----- Save and Set Environment Variables -------------------------------- PROGDIR=/usr/local/apache-2.0/bin # ----- Define Function --------------------------------------------------- start() { 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 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