| seacaptain 回复于:2004-08-16 18:22:18 |
| 支持。
收藏 |
| hrcxf 回复于:2004-08-19 09:31:02 |
| 好啊!
支持! |
| dongdonga 回复于:2004-08-19 13:04:53 |
| 收藏,谢谢! |
| z33 回复于:2004-09-07 11:19:18 |
| 有用,先收了,谢谢! |
| chfzoe 回复于:2004-10-25 19:07:17 |
| 您好
我依照你的文章做,可是仍然無法使用 我是用redhat 9 vsftp-1.1.3-8 awstats-6.2 當我執行 ./awstats.pl以下的執行結果是否正確 ------------------------------------------------------------- [root@localhost cgi-bin]# ./awstats.pl -update -config=bjftp.xxx.com Update for config "/etc/awstats/awstats.bjftp.xxx.com.conf" With data in log file "/var/log/vsftpd.log"... Phase 1 : First bypass old records, searching new record... Direct access after last parsed record (after line 335) Jumped lines in file: 335 Found 335 already parsed records. Parsed lines in file: 0 Found 0 dropped records, Found 0 corrupted records, Found 0 old records, Found 0 new qualified records. ------------------------------------------- 還有當我在網址列上打上 "http:///awstats/awstats.pl?-config=bjftp.xxx.com" 它會連結到"www.awstats.com" 如果可以請跟我連絡 [email protected] |
| eagerlinuxer 回复于:2004-10-26 13:25:39 |
| 呵呵,谢谢大家支持。
你的日志格式好象有问题,能不能贴出来看一下。 |
| cyrus 回复于:2004-11-06 22:35:48 |
| [quote:6491d695d5="chfzoe"]alhost cgi-bin]# ./awstats.pl -update -config=bjftp.xxx.com
Update for config "/etc/awstats/awstats.bjftp.xxx.com.conf" With data in log file "/var/log/vsftpd.log"... Phase 1 : First bypass old rec..........[/quote:6491d695d5] ft.. SiteDomain="bjftp.xxx.com” #域名、服务器名(一定要定义,在生成awstats数据库时要用到) HostAliases="bjftp.xxx.com bjftp 127.0.0.1 localhost" 这个你没看全 这个要和你自己的主机域名相符合 |
| cyrus 回复于:2004-11-07 02:29:44 |
| 很感谢楼主的开拓精神,发点自己的使用经验对你支持
1,一定要把域名写到配置文件里面 这个在awstats.model.conf的配置行里面添加,如果是ip的话,可以参照以下格式 eg:ip=192.168.0.1 那么必须添加两行 SiteDomain="192.168.0.1" HostAliases="192.168.0.1 www.192.168.0.1 127.0.0.1 localhost" 至于为什么这样填写,没仔细研究, 不过如果要通过例子理解的话,可以在 tools/awstats_configure.pl 用一个ip或者域名对一个apache.log分析 2,文件夹和文件的可读权限 配置过程中一般提示可读权限的地方集中在 DirData="/home/awstats"#自定义分析分析数据文件夹 LogFile="/var/log/vsftpd.log"#vsftp的日志文件 这两个我一般设置为770 毕竟是用一般系统用户执行的命令 3,主要配置参数 如果以上几点都做好了 那么应该考虑这些配置 LogType=F LogFormat="%time3 %other %host %bytesd %url %other %other %method %other %logname % other %code %other %other" LogSeparator="\s" 4 其他参数的功能还没发掘,不过一个从http://awstats.sourceforge.net/docs/awstats_faq.html#SERVERSOS找到的一个ftp配置例子已经能解决很多问题,当然,关键参数要加上,不过这个程序会提示出错的地方,自己看手册和FAQ拉,希望大家的英语ok:) good luck |
| DreamJiang 回复于:2004-11-08 15:06:32 |
| 我在利用Awstat為vsftpd生成統計網頁時,在相應的目錄下執行./awstats -update -config=linuxtest.abc.com時,出現與上樓兄弟一樣的錯誤提示,不知上樓的兄弟是如何解決的?請多指點,多謝!!! |
| eagerlinuxer 回复于:2004-11-08 17:56:59 |
| 呵呵,你用的是vsftpd的日志格式,要用wuftp的日志格式:
Sun May 23 08:34:27 2004 67 192.168.13.102 975291 /lastlog a _ o a -anonymous@ ftp 0 * c 你必须在vsftpd.conf中做以下设置: xferlog_enable=YES xferlog_std_format=YES xferlog_file=/var/log/vsftpd.log (注:如果有vsftpd_log_file=/XXX/XXX请把它注释掉) 如果你用的vsftpd的版本在1.2以下,即使在vsftpd.conf中做了以上的设置,也可能生成不了这种格式的日志文件。 |
| eagerlinuxer 回复于:2004-11-08 18:21:52 |
| [quote:83eafd983f="cyrus"]很感谢楼主的开拓精神,发点自己的使用经验对你支持
1,一定要把域名写到配置文件里面 这个在awstats.model.conf的配置行里面添加,如果是ip的话,可以参照以下格式 eg:ip=192.168.0.1 那么必须添加两行 Site..........[/quote:83eafd983f] 感谢cyrus的补充,这些我的确没有写完整 :oops: 希望大家一起来补充这个文档。包括用GeoIP来定义不同的省市,这样我们就可以知道什么地方的用户使用你的ftp最多了 :em02: |
| DreamJiang 回复于:2004-11-12 18:02:04 |
| 我己經利用./awstats.pl -update -config=linuxtest.abc.com生成了awstats.linuxtest.abc.com.conf文件,但是利用ie時,輸入http://linuxtest.abc.com/awstats/awstats.pl?-config=linuxtest.abc.com時,卻出現“下載awstats.pl文件的對話框”,卻不能顯示頁面。如果輸入http://linuxtest.abc.com/awstats時卻出現:
Forbidden You don't have permission to access /awstats/ on this server. -------------------------------------------------------------------------------- Apache/1.3.23 Server at linuxtest.abc.com Port 80 此時在/var/log/httpd/error_log文件中有如下信息: [Fri Nov 12 15:57:59 2004] [error] [client 192.168.60.87] Directory index forbidden by rule: /usr/local/awstats/wwwroot/cgi-bin/ 不知是為什麼?請大家多指點,多謝了!!! |
| jackieyuan 回复于:2004-11-20 18:39:12 |
| 这篇文章可以被评选Top100了!! 强烈支持! :em09: :em16: |
| jackieyuan 回复于:2004-11-20 18:42:03 |
| [quote:da0001fc5c="eagerlinuxer"](放linux版里没人看,所以放FTP版里试试,呵呵)
一、 AWStats简介 AWStats是在Sourceforge上发展很快的一个基于Perl的WEB日志分析工具。现今它也可以用来分析多种日志包括:Apache 1.3.x and 2.x, IIS 5.0 an..........[/quote:da0001fc5c] 一个我的例子,不知道对你有没有帮助。 http://linux.dalouis.com/awstats/awstats.pl?config=hzmjpbbs 另外作一点补充。如果你的 vsftpd 使用的是 virtual username 的话,要把 红色部分去掉。 [quote:da0001fc5c]LogFormat="%time3 %other %host %bytesd %url %other %other %method %other[color=red:da0001fc5c] %logname [/color:da0001fc5c]%other %code %other %other" [/quote:da0001fc5c] 同时要重新编译 vsftpd 包里面的 loggin.c 文件 找到 [code:1:da0001fc5c] /* Access mode: anonymous/real user, and identity */ if (p_sess->is_anonymous) { str_append_text(p_str, "a "); str_append_str(p_str, &p_sess->anon_pass_str); } else { str_append_text(p_str, "r "); str_append_str(p_str, &p_sess->user_str); } /* str_append_char(p_str, ' '); # --Edit by Kreny /* Service name, authentication method, authentication user id */ str_append_text(p_str, "ftp 0 * "); /* Completion status */ if (succeeded) { str_append_char(p_str, 'c'); } else { str_append_char(p_str, 'i'); } } [/code:1:da0001fc5c] 其中 这一行是我修改的。原本会添加一个空格,现在把这个空格去掉就ok了。 [code:1:da0001fc5c]/* str_append_char(p_str, ' '); # --Edit by Kreny[/code:1:da0001fc5c] 当然,如果要保留上面的 $logname 的话,在这个空格里面添加一个自己喜欢的名字也可以。 以下就是编译前和编译后的log的区别。 --> "a" 和 "ftp" 之间有两个空格 [code:1:da0001fc5c]Sat Nov 20 21:52:54 2004 806 220.112.93.119 43780 /download/file.rar b _ o a ftp 0 * i[/code:1:da0001fc5c] --> "a" 和 "ftp" 之间只有一个空格 [code:1:da0001fc5c]Sat Nov 20 21:54:37 2004 3 220.112.93.119 48180 /download/file.rar b _ o a ftp 0 * i[/code:1:da0001fc5c] |
| klark 回复于:2004-11-20 21:56:25 |
| 可以支持solaris8吗?
而且我在httpd.conf中没找到CustomLog logs/access_log common 只有 # CustomLog logs/dummy-host.example.com-access_log common 如何更改? |
| deng805 回复于:2005-01-03 16:35:26 |
| 我是参考楼主和它官站上的
With ProFTPd: 1- Setup your server log file format: Modify the proftpd.conf file to add the following two lines : LogFormat awstats "%t %h %u %m %f %s %b" # WARNING: You must use a tab char between % tags and not a space ! ExtendedLog /var/log/xferlog read,write awstats # WARNING: ExtendedLog directive might need to be placed inside a virtual host context if you use them. Then turn off old format Transfer log: TransferLog none # WARNING: TransferLog directive might need to be placed inside a virtual host context if you use them. To have the change effective, stop your server, remove old log file /var/log/xferlog and restart the server. Download a file by FTP and check that your new log file looks like this: [01/Jan/2001:21:49:57 +0200] ftp.server.com user RETR /home/fileiget.txt 226 1499 2- Then setup AWStats to analyze the FTP log file: Copy config file "awstats.model.conf" to "awstats.ftp.conf". Modify this new config file: LogFile="/var/log/xferlog" LogType=F LogFormat="%time1 %host %logname %method %url %code %bytesd" LogSeparator="\t" NotPageList="" LevelForBrowsersDetection=0 LevelForOSDetection=0 LevelForRefererAnalyze=0 LevelForRobotsDetection=0 LevelForWormsDetection=0 LevelForSearchEnginesDetection=0 ShowLinksOnUrl=0 ShowMenu=1 ShowMonthStats=UVHB ShowDaysOfMonthStats=HB ShowDaysOfWeekStats=HB ShowHoursStats=HB ShowDomainsStats=HB ShowHostsStats=HBL ShowAuthenticatedUsers=HBL ShowRobotsStats=0 ShowEMailSenders=0 ShowEMailReceivers=0 ShowSessionsStats=1 ShowPagesStats=PBEX ShowFileTypesStats=HB ShowFileSizesStats=0 ShowBrowsersStats=0 ShowOSStats=0 ShowOriginStats=0 ShowKeyphrasesStats=0 ShowKeywordsStats=0 ShowMiscStats=0 ShowHTTPErrorsStats=0 ShowSMTPErrorsStats=0 运行那个命令是,错误如下图(远程管理不会复制就截了个图): |
| good_bad_boy 回复于:2005-02-22 10:06:42 |
| 楼主,我给你发过邮件,可是地址不存在,想问你现在通过IP地址显示国内省市的插件搞定了吗?俺也很想要这个,不知还能不能看到这个留言了。
盼复 |