lizongbo 的编程学习

编程学习 java为主的web应用开发

  DonewsBlog  |  Donews首页  |  Donews社区  |  Donews邮箱  |  我的首页  |  联系作者  |  聚合   |  登录
  75篇文章 :: 0篇收藏:: 35篇评论:: 2个Trackbacks

公告

lizongbo的blog


文章

收藏

相册

常用网址

存档


正在读取评论……


1.安装perl,下载地址:
http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.6.811-MSWin32-x86-122208.msi
http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl
b.运行安装程序,安装到d:\perl,其余使用默认值,安装完成即可。
2.让Tomcat支持cgi.(只需要第一步)
1. 把servlets-cgi.renametojar (在CATALINA_HOME/server/lib/目录下)改名为servlets-cgi.jar。处理CGI的servlet应该位于Tomcat的CLASSPATH下。
3.按照http://www.pchighway.com/helpdesk/index.php?page=index_v2&id=1675&c=2
或者http://www.turro.org/Portal?xpc=1$@8$@1$@1&folder=20050104154634840
下载那个http://www.pchighway.com/helpdesk/awstats.war
解压到D:\jakarta-tomcat-5.5.7\webapps.
先把D:\jakarta-tomcat-5.5.7\webapps\awstats\WEB-INF\cgi-bin下的awstats.model.conf命名为common.conf,
接着建立新文件,awstats.localhost.conf内容参考车东的文件,
启动Tomcat,通过
http://localhost:8080/awstats/cgi-bin/awstats.pl?config=localhost&update=1
就可以生成日志分析结果了。
 
为了保护日志分析,我在
D:\jakarta-tomcat-5.5.7\webapps\awstats\WEB-INF\web.xml里加上了下面一段
(来自D:\jakarta-tomcat-5.5.7\server\webapps\manager\web.xml)用来保护访问资源:
 
 <!-- Define reference to the user database for looking up roles -->
 <resource-env-ref>
  <description>
      Link to the UserDatabase instance from which we request lists of
      defined role names.  Typically, this will be connected to the global
      user database with a ResourceLink element in server.xml or the context
      configuration file for the Manager web application.
    </description>
  <resource-env-ref-name>users</resource-env-ref-name>
  <resource-env-ref-type>org.apache.catalina.UserDatabase</resource-env-ref-type>
 </resource-env-ref>
 <!-- Define a Security Constraint on this Application -->
 <security-constraint>
  <web-resource-collection>
   <web-resource-name>awstats status</web-resource-name>
   <url-pattern>/*</url-pattern>
  </web-resource-collection>
  <auth-constraint>
   <role-name>manager</role-name>
  </auth-constraint>
 </security-constraint>
 <!-- Define the Login Configuration for this Application -->
 <login-config>
  <auth-method>BASIC</auth-method>
  <realm-name>Awstats status</realm-name>
 </login-config>
 <!-- Security roles referenced by this web application -->
 <security-role>
  <description>
      The role that is required to log in to the Manager Application
    </description>
  <role-name>lizongbo</role-name>
 </security-role>
 
相关参考资源:
 
http://www.chedong.com/tech/awstats.html
http://www.chedong.com/cgi-bin/awstats/awstats.pl?config=chedong
http://www.chedong.com/tech/search_engines.pm
http://awstats.sourceforge.net/




Trackback: http://tb.donews.net/TrackBack.aspx?PostId=280224


[点击此处收藏本文]  发表于2005年02月18日 9:05 AM




正在读取评论……

发表评论

大名:
网址:
验证码
评论