Archive for blog

WP Guest Google Map

访问者的地域统计 stats

访问者的当前地址 location

访问者的天气预报地图 weather

恩, 这个应用没技术含量.
有兴趣可以看看这个:
用google map api制作的魔兽世界游戏地图:http://mapwow.com/

飞落暴风城: http://mapwow.com/?lng2=63.91845703125&lat2=52.07612995654167&zoom=8
部落飞行路线: http://mapwow.com/?lng2=-42.01171875&lat2=64.69910544204765&zoom=3

Comments (1)

老外的有才留言

用wordpress现在很麻烦的一个问题就是, 垃圾留言太多了, 都是国外广告.
到是见到有个过滤的插件, 可是人懒,还没查过.

不过删留言有时候也蛮搞笑的, 比如这位老兄的

9v@aol.com | IP: 62.215.3.45

Your site is a refreshing change from the majority of sites I have visited. When I first started visiting web sites I was excited by the potential of the internet as a resource and was very disappointed initially. You have restored my enthusiasm and I thank you for your efforts to share your insights and help the world become a better place.

Sep 16, 11:32 AM

简直就是周星驰”滔滔江水”的英文版, 还感谢我把世界变得更美好了~~~

再如这位,很有我的风格:

wzpu0r6aw622b2v@mail.com | IP: 218.58.136.4

Just wanted to say hi, thanks and bye

Sep 16, 11:33 AM

不过怎么看怎么都是爬虫爬出来的

这位居然要我的空间:

91l457@bigfoot.com | IP: 195.190.158.2

Hello. May I rent your layout for my site? :)

Sep 16, 11:37 AM

就是可怜啊, 要看这些留言度日.

Comments (2)

几个小时看别人的blog

今天周末,昏睡不少,晚上一直在看一个人的blog,看了几个小时。
杂谈日本(原名:东京游记)
最初连载:http://blog.guanshui.com/get_star
现在是在:http://getstar.blog.sohu.com/
是个程序员到日本工作的记录,从2005年夏天到现在,2年多,几乎每天一篇,颇为坚持。
作者倒非学识之辈,但言语非常忠实,能在反日情绪高涨的网络中存活2年,可见大家都是认可的。

日本确是发达,作者也确没有媚外的心态,非一般XX人,不过还是多了解些国内的进步再去做对比来的好。
一键装系统,高清电视之类的东西也要惊叹,不免为大家所笑话。

本来之前整治site,就是打算记录点什么的。
已经错过不少了,日后能多记下些就好了。
这点要向他学习。

Comments

申请了 google ads

申请了google ads, 这应该是个好玩的东东

这下面将在某年某月某日某天某小时某份某秒出现3个广告栏,拭目以待



等了1个多小时还是没出现~~
等了3个小时还是没有出现~~~~

Comments (2)

时区设置

忽然想起来DH的server都是在US的,系统时间岂不是和CN不同。
ssh上去一看,果然错误,系统用的是PDT
然后改成PRC,

$vi ~/.bash_profile

末尾增加一行

export TZ=PRC

这样以后登录就都是GMT+8了

查了wordpress,在Options有blog运行时区的设置,很早以前就设置了GMT+8,这个和系统时区无关的。
看了下这几天的文字的日期,也都正确。

Gallery2的时间只精确到day,倒省心,反正照片的拍摄信息里的时间更为有用。

phpBB的控制台也有时区选择,之前设置过,也没出错。

倒是crontab之类和时间密切相关的程序需要自己大脑进行时区转换了。
昨天设置的0 9 * * * , 本想每天上午可以刷新,可是现在还没执行到呢 :(

难道以后装软件都要留心这个问题不成?应该有彻底些的办法。寻觅中……

Comments

[DreamH 3]网站访问统计awstats

dreamhost将logs目录固化在用户根目录下了, 分域名存储,目录结构如下

logs
|– fanlix.com
| |– http -> http.5xxxxx9
| `– http.5xxxxx9
| |– access.log
| |– access.log.0 -> access.log.2007-07-31
| |– access.log.2007-07-28.gz
| |– access.log.2007-07-29.gz
| |– access.log.2007-07-30
| |– access.log.2007-07-31
| |– analog
| | |– fanlix.com.2007-07.cache
| | |– fanlix.com.2007-07.cache.yesterday
| | |– fanlix.com.daily.conf
| | |– fanlix.com.longterm.cache
| | |– fanlix.com.longterm.cache.yesterday
| | |– fanlix.com.longterm.conf
| | `– fanlix.com.monthly.conf
| |– analog_success.txt
| |– error.log
| |– error.log.0 -> error.log.2007-07-31
| |– error.log.2007-07-28.gz
| |– error.log.2007-07-29.gz
| |– error.log.2007-07-30
| |– error.log.2007-07-31
| |– hits
| | |– bandwidth.20070728
| | |– bandwidth.20070729
| | |– bandwidth.20070730
| | |– hits.20070730
| | `– ref.20070730
| `– html
| |– daily
| |– daily.html -> /home/fanlix/logs/fanlix.com/http.5xxxxx9/html/inactive_report.html
| |– inactive_report.html
| |– index.html -> /home/fanlix/logs/fanlix.com/http.5xxxxx9/html/monthly/2007-07/index.html
| |– longterm
| | |– code.png
| | |– index.html
| | `– size.png
| |– longterm.html -> /home/fanlix/logs/fanlix.com/http.5xxxxx9/html/longterm/index.html
| |– main.html
| |– monthly
| | `– 2007-07
| | |– browrep.png
| | |– browsum.png
| | `– type.png
| `– monthly.html -> /home/fanlix/logs/fanlix.com/http.5xxxxx9/html/monthly/2007-07/index.html

可见不只是apache日志那么简单,还有简单的统计分析。
可是google了一下也没找到访问的方式,DH自己的页面里也只是说道可以下载Funnel Web来自己进行数据统计,并没说这些文件的何去何从。

不论怎么统计,似乎不能比awstats再厉害了吧。
以前用过awstats,还曾经通过上面记录的一个可疑ip,一路反查出一个访问我blog的同学来。
Let’s yEsTerday onCe mOre.

首先到Panel -> Status -> Site Statistics 将logs的保存选择为恰当时效,比如360 Day (hoho~)
默认是保存3日,超过3日的会占用自己的空间,200G,随便用吧。
后面的edit点进去可以设置生成日志统计和邮件提醒的细节。
难怪刚才找不到logs目录的访问方式,原来那些统计文件是发邮件用到的。将logs目录开放是很危险的。

DH默认是没有装awstats的:

$ aptitude search awstats
p awstats – powerful and featureful web server log analyzer

自己动手:

$ wget ‘http://jaist.dl.sourceforge.net/sourceforge/awstats/awstats-6.7.tar.gz’
$ tar -zxvf awstats-6.7.tar.gz
$ mv awstats-6.7 ~/websoft/awstats

————–中间这个方法有些麻烦,可以跳过看下个分割线—————–
然后到panel设置访问路径
Domains -> Remap Sub-Dir
将 http://www.fanlix.com/awstats 映射到 /home/fanlix/websoft/awstats/wwwroot
(有句话提示映射到他人目录没有cgi执行权限, 也就是说可以映射了哦…. shell可是无法访问他人目录的)

cd cgi-bin/
cp awstats.model.conf awstats.fanlix.com.conf
vi awstats.fanlix.com.conf

1500行的配置文件,在结尾加上必要的配置即可:

LogFile=”/home/fanlix/logs/fanlix.com/http/access.log”
SiteDomain=”fanlix.com”
HostAliases=”www.fanlix.com”
DNSLookup=0
DirData=”/home/fanlix/websoft/awstats/awdata”
DirIcons=”icon”
SaveDatabaseFilesWithPermissionsForEveryone=0
DefaultFile=”index.php index.html”
LogFormat=”%host %other %other %time1 %methodurl %code %bytesd %refererquot %uaquot”

然后设置crontab 定时每天9点运行

0 9 * * * (/home/fanlix/websoft/awstats/wwwroot/cgi-bin/awstats.pl -config=fanlix.com -update 2>&1 >/dev/null)

别忘记把执行的cmd在shell里跑一下。输出如下:

Create/Update database for config “/home/fanlix/websoft/awstats/wwwroot/cgi-bin/awstats.fanlix.com.conf” by AWStats version 6.7 (build 1.892)
From data in log file “/home/fanlix/logs/fanlix.com/http/access.log”…
Phase 1 : First bypass old records, searching new record…
Searching new records from beginning of log file…
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)…
Jumped lines in file: 0
Parsed lines in file: 233
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 233 new qualified records.

这时候应该可以用域名来访问这个统计页面了
怎么是 Index …… 改改改
怎么看不到图标 …. 改改改
怎么 ….. 不改了,太麻烦

———————–下面方法是最佳的—————————
以前的安装方法在dreamhost有些麻烦,参考了wiki的方法:
http://wiki.dreamhost.com/index.php/AWStats_Installation
1, 不使用dreamhost的subdir remap.
直接在域名根目录建立目录 awstats,作为awstats的dir目录
将wwwroot下的4个资源文件夹link 到这里

2,配制文件如上面的设置,无需改变

3,crontab 使用awstats自带的tool脚本

0 9 * * * ( /usr/bin/perl /home/fanlix/websoft/awstats/tools/awstats_buildstaticpages.pl -config=fanlix.com -update \
-awstatsprog=/home/fanlix/websoft/awstats/wwwroot/cgi-bin/awstats.pl -dir=/home/fanlix/fanlix.com/awstats 2>&1 >/dev/null )

这样会在fanlix.com/awstats/下面生成一系列静态页面

4,主html是awstats.fanlix.com.html,可以通过.htaccess或者直接link把它作为index,这样就能直接访问了
以前都是用cgi-bin目录的脚本加参数访问的,比如
http://www.fanlix.com/awstats/awstats.pl?config=www.fanlix.com
现在变成静态页面,方式好了很多。(除了不能动态调用脚本功能了)

现在终于可以看到访问统计了:http://www.fanlix.com/awstats/

目前比以前安装的结果还缺少2个功能: 访问控制、IP数据库。
控制到无所谓了,如此小的访问量笑话就笑吧;IP数据库倒是比较实用。

Comments (1)

网站搬家完毕

最近想写点东西了,不过继续用中国电信的ADSL来做web服务确实不是明智之举。
于是寻找host。
略为对比,现在就安家在DreamHosts了。

dreamhost 相当不错, 申请、购买到自己建好一个bbs也只用了10多分钟。
速度也很不错,我的页面原来放在自己机器上,从来就不压缩图片的,一般都是200k以上。打开一个N多图片的页面,图片很快就刷出来了。
wordpress的迁移和很顺畅,开始还担心数据插件什么的, 2个scp就搞定了。
之前选了utf8,mysql和乱码就没有出现。

green site hoho~~~

随后会有Dreamhost的申请、评测,wordpress的迁移方法等。
现在dns还没从US刷过来呢,只能改hosts访问。

Comments (2)

my WP is ready

都说WordPress是5分钟建好,但在debian(etch)下却麻烦了我一阵子。
debian自己写了一套管理wp目录和配置的方式,不是WP标准的wp-config.php修改方式。

过程参照这里:
http://www.nerdylorrin.net/wiki/Wiki.jsp?page=WordPress
关键是 配置脚本放在了doc下却没打电话告诉我, 害我一番好找。上面的文档是装完后才google到的

装完后第一次设置成功,但是第二次打开页面还显示WP未安装:

It doesn’t look like you’ve installed WP yet. Try running install.php

从wp的官方找到了这个被推卸到mysql的问题:
http://wordpress.org/support/topic/58313

I noted that the wp_options table was marked: “In Use” on the PHP Myadmin Structure tab, even though the site was inaccessible.
It was fixed by running the following query:
mysql> repair table wp_options;

试了一下,确实有效。然后就是你看到的现在这个千篇一律的界面了。

顺便抱怨一下电信ADSL的速度: 400-600ms的延时,25%的丢包
浏览比较卡而已,编辑则慢如牛。看来以后还是在家里编辑的好。

Comments (4)

« Previous Page « Previous Page Next entries »