Redirect / "http://124.42.1.138/" 查看全文
Redirect / "http://124.42.1.138/" 查看全文
#!/bin/bash
LANG=en.US
D=`date +"%Y%m%d"`
LOG="$1"
cat ${LOG}| awk '{print $1}' | sort | uniq -c | sort -rn>./countIP_${2}.log
exit 1
Alias /shop/ "/home/tom3/webapps/bjnewshop/"
<Directory "/home/tom3/webapps/bjnewshop">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
编译apache 打开dav支持:
./configure --prefix=/usr/local/apache2 --enable-rewrite --enable-so --with-mpm=worker --with-threads=yes --enable-headers --enable-deflate --enable-dav --enable-dav-fs --enable-dav-lock
编译subversion ,
./configure --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/home/admin/_backup/httpd-2.2.8/srclib/apr --with-apr-util=/home/admin/_backup/httpd-2.2.8/srclib/apr-util --with-ssl
查看全文#!/bin/sh
log_file="$1"
date="$2"
begin_time="$3"
end_time="$4"
new_log="`hostname -i | awk -F[.] '{print $4}'`"
if [ $# -lt 4 ]; then
echo "`basename $0`: useing log_file(catalina.out) DATE(yyyy-m-d) begin_time(hh:mm) end_time(hh:mm) "
else
begin_grep="${date} ${begin_time}"
echo ${begin_grep}
end_grep="${date} ${end_time}"
echo ${end_grep}
begin_lines_num=`grep -n "${begin_grep}" ${log_file} | head -1 |awk -F'[:t]' '{print $1}'`
echo ${begin_lines_num}
end_lines_num=`grep -n "${end_grep}" ${log_file} | tail -1 |awk -F'[:t]' '{print $1}'`
echo ${end_lines_num}
lines=`expr ${begin_lines_num} - ${end_lines_num}`
echo ${lines}
head -${end_lines_num} ${log_file} | tail ${lines} >../logs/${new_log}_${begin_time}_${end_time}.log
fi
查看全文Tomcat 默认是不允许软连接的。在 <Context />; 里面加上 allowLinking="true" 属性就可以了。 查看全文
apache编译安装
//httpd2.2
./configure --prefix=/home/www --enable-rewrite --enable-so --with-mpm=worker --with-threads=yes
make clean
./configure --prefix=/home/www/apache22w1 --enable-so --with-mpm=worker --with-threads=yes
make ;make install
查看使用什么mpm
$apache/bin/httpd -l
下面介绍一下怎样打开apache的mod_rewrite功能。
#tar -zxvf httpd-2.0.59.tar.gz
#cd httpd-2.0.59
#./configure --prefix=/opt/apache2 --enable-modules=so --enable-module=rewrite --enable-shared=rewrite --enable-shared=max
#make
#make install
首先来重新编译安装apache-2.0.59
#tar -zxvf httpd-2.0.59.tar.gz
#cd httpd-2.0.59
#./configure --prefix=/opt/apache2 --enable-so --enable-module=rewrite --enable-shared=rewrite --enable-shared=max
#make
#make install 查看全文
# apache
./configure --prefix=/home/www --enable-so
#生成mod_jk.so文件
./configure --with-apxs=/home/www/bin/apxs --enable-EAPI