apache日志统计 按小时,分钟统计url访问次数
####################按小时统计url访问次数# $1 url#!/bin/shif [ "$1" = "" ]then echo "Url is null ... EXIT"exit 1fiLOG='/www/apache_log'HOUR="`seq -w 0 23`"files="`ls -trl ${LOG}/web-?*.log | awk '{print $9}'`"url="$1"export LOG HOUR files urlfor file in $filesdofor a in ${HOUR}do num=`cat ${file} |awk '{print $4"t"$7}' |grep "${url}"|grep "/2009:${a}"|wc -l`echo "${file}:${a} ${num}"echo "---
apache_httpd.conf_重定向到其它网址
Redirect / "http://124.42.1.138/"[@more@]ac
apache日志中IP地址排序
#!/bin/bashLANG=en.USD=`date +"%Y%m%d"`LOG="$1"cat ${LOG}| awk '{print $1}' | sort | uniq -c | sort -rn>./countIP_${2}.logexit 1[@more@]
apache_别名_Alias
Alias /shop/ "/home/tom3/webapps/bjnewshop/" <Directory "/home/tom3/webapps/bjnewshop"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all</Directory>[@more@]
apache_tomcat_jsp测试页面
1:<%@page language="java" import="java.util.*"%>Now Time is : <% out.println(new Date()); %>2:<%=new java.util.Date()%>[@more@]1:<%@page language="java" import="java.util.*"%>Now Time is : <% out.println(new Date()); %>2:<%=new java.util.Date()%>
apache+subversion
编译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[@more@]编译apache 打开dav支持:./configure --prefix=/usr/local/apache2 --enable-rewrite --en
tomcat的catalina.out截取日志脚本
#!/bin/shlog_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) "elsebegin_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]'
solaris 9 +apache 2.0.47 +tomcat-connectors-1.2.26-src
[@more@]########################################## Solaris Tomcat Connectors#########################################wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/9/autoconf-2.60-sol9-sparc-local.gzgunzip autoconf-2.60-sol9-sparc-local.gzpkgadd -d autoconf-2.60-sol9-sparc-localwget ftp://ftp.sunfreeware.com/pub/freeware/sparc/9/automake-1.10-sol9-sparc-local.gzgunzip automake-1.10-sol9-sparc-local.gzpkgadd -d automake-1.10-sol9-sparc-local# apache configure installgunzip -c httpd-2.0.47.tar.
apache2.2支持worker,rewrite模块,支持线程
apache编译安装//httpd2.2./configure --prefix=/home/www --enable-rewrite --enable-so --with-mpm=worker --with-threads=yes[@more@]apache编译安装//httpd2.2./configure --prefix=/home/www --enable-rewrite --enable-so --with-mpm=worker --with-threads=yes//lt_LogFormatLogFormat "%h %l %u %{[%Y/%m/%d/%w:%H:%M:%S]}t "%r" %>s %b "%{User-agent}i"" combinedCustomLog "|/usr/local/sbin/cronolog /home/www20/logs/web-%Y%m%d.log" combined//fj_LogFormatLogFormat "%h
apache22_编译支持mpmr.txt
make clean./configure --prefix=/home/www/apache22w1 --enable-so --with-mpm=worker --with-threads=yesmake ;make install查看使用什么mpm$apache/bin/httpd -l[@more@]make clean./configure --prefix=/home/www/apache22w1 --enable-so --with-mpm=worker --with-threads=yesmake ;make installmake clean./configure --prefix=/home/www/apache22w2 --enable-so --with-mpm=workermake ;make installmake clean./configure --prefix=/home/www/apache22p1 --enable-so --with-mpm=prefork --with-threads=yesmake ;make installmak
http TRACE 跨站攻击
下面介绍一下怎样打开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[@more@]下面介绍一下怎样打开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 installapache安装完毕,下面来加载编译
打开apache的mod_rewrite功能
首先来重新编译安装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[@more@]下面介绍一下怎样打开apache的mod_rewrite功能。zhy1899 圣骑士会员UID:131228注册时间:2004-2-7 09:54最后登录:2007-5-17 10:13帖子总数: 125 精华帖子: 0积分:91在线状态:...离线...首先来重新编译安装apache-2.0.59#tar -zxvf httpd-2.0.59.tar.gz#cd httpd-2.0.59#./configure --prefix=/opt/
Linux下Tomcat的安装
Linux下Tomcat的安装1.下载Tomcat在下面的地址下载Tomcat的二进制版[@more@]Linux下Tomcat的安装1.下载Tomcat在下面的地址下载Tomcat的二进制版 http://mirrors.ccs.neu.edu/Apache/dist/jakarta/tomcat-4/binaries/即下载文件 tomcat-4.1.18.tar.gz2. 安装首先解压缩 gunzip tomcat-4.1.18.tar.gz tar -zxvf tomcat-4.1.18.tar得到Tomcat的所有文件.然后把它拷贝到你要安装的位置,如 /opt/tomcat-4.1.18/然后为了方便,你可以把目录名tomcat-4.1.18改为tomcat.3.设置设置路经在/etc/profile文件中加入如下两行
apache +tomcat 桥接
# apache./configure --prefix=/home/www --enable-so#生成mod_jk.so文件./configure --with-apxs=/home/www/bin/apxs --enable-EAPI[@more@]# apache./configure --prefix=/home/www --enable-so#生成mod_jk.so文件./configure --with-apxs=/home/www/bin/apxs --enable-EAPI# httpd.confLoadModule jk_module modules/mod_jk.so#AddModule mod_jk.c## Mod_jk settings#JkWorkersFile "conf/workers.properties"JkLogFile "logs/mod_jk.log"JkLogLevel errorJkMount /*.jsp defaultJkMount /*.do default#logsLogFor