通过Apache日志查找RSS订阅者计数

If you’ve declined to use a service like FeedBurner to handle your RSS feeds, you might wonder how many subscribers you actually have. This also works well for finding subscriber counts to specific categories or comment posts on your site, which you typically wouldn’t run through FeedBurner.

如果您拒绝使用FeedBurner之类的服务来处理RSS feed,您可能想知道您实际上有多少个订阅者。 这对于查找特定类别的订阅者计数或您网站上的评论帖子也很有效,而通常不会通过FeedBurner运行这些订阅者计数。

It turns out that most of the bigger feed readers like Google Reader and Netvibes will actually show you the count during the request for your feed. All you have to do is take a peek inside your access log files.

事实证明,大多数较大的提要阅读器(例如Google Reader和Netvibes)实际上会在请求提要时向您显示计数。 您所需要做的就是浏览访问日志文件。

First you’ll need to locate your apache logfile, which is normally called access_log or access.log. The location for this file will vary greatly based on distribution and your hosting provider. Here’s a couple of places to start, but you might have to look around.

首先,您需要找到您的apache日志文件,通常称为access_log或access.log。 该文件的位置将根据分发情况和您的托管服务提供商而有很大不同。 这里有几个开始的地方,但是您可能必须四处看看。

Ubuntu default:

Ubuntu默认值:

/var/log/apache2/access.log

/var/log/apache2/access.log

MediaTemple DV default:

MediaTemple DV默认值:

/var/www/vhosts/<hostname>/statistics/logs/access_log

/ var / www / vhosts / <主机名> / statistics / logs / access_log

Dreamhost default:

Dreamhost默认值:

~/logs/<hostname>/http/access.log

〜/ logs / <主机名> /http/access.log

Now that you’ve found the logfile, it’s a simple matter of running it through grep for the keyword “subscribers”, which most of the feed readers use to show the subscriber count. You could just use the simplest command:

现在,您已经找到了日志文件,只需通过grep运行关键字“ subscribers”就可以了,这是大多数提要阅读器用来显示订阅者人数的关键字。 您可以使用最简单的命令:

grep -i subscribers access_log

grep -i订户access_log

Or, if you wanted to find the subscribers for a particular feed, you could run it through a second grep to restrict to just that rss feed.

或者,如果您要查找特定提要的订阅者,则可以通过第二个grep来运行它以将其限制为该rss提要。

grep -i subscribers access_log | grep -i ‘/howtogeek/feed/’

grep -i订户access_log | grep -i'/ howtogeek / feed /'

Here’s an example of what that brings back on my personal blog (which I should really update more)

这是一个例子,可以带回我的个人博客(我应该进一步更新)

209.85.238.9 – – [28/Aug/2007:06:08:23 -0700] “GET /howtogeek/feed/ HTTP/1.1” 302 572 “-” “Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 52 subscribers; feed-id=13671896334760112923)” 193.189.143.237 – – [28/Aug/2007:06:12:32 -0700] “GET /howtogeek/feed/ HTTP/1.0” 302 535 “-” “Netvibes (http://www.netvibes.com/; 2 subscribers)” 64.78.155.100 – – [28/Aug/2007:06:14:40 -0700] “GET /howtogeek/feed/ HTTP/1.1” 302 535 “-” “NewsGatorOnline/2.0 (http://www.newsgator.com; 2 subscribers)”

209.85.238.9 – – [28 / Aug / 2007:06:08:23 -0700]“ GET / howtogeek / feed / HTTP / 1.1” 302572“-”“ Feedfetcher-Google; (+ http://www.google.com/feedfetcher.html; 52个订阅者; feed-id = 13671896334760112912923)” 193.189.143.237 – – [28 / Aug / 2007:06:12:32 -0700]“ GET / howtogeek / feed / HTTP / 1.0” 302 535“-”“ Netvibes(http://www.netvibes.com/; 2个订阅者)” 64.78.155.100 – – [28 / Aug / 2007:06:14:40 -0700] “ GET / howtogeek / feed / HTTP / 1.1” 302535“-”“ NewsGatorOnline / 2.0(http://www.newsgator.com; 2个订阅者)”

Note the bolded text that shows I have all of 56 subscribers from those three online feed readers. Mysticgeek has a lot more from Google alone:

请注意以粗体显示的文本显示了这三个在线供稿阅读器中的56个订阅者。 仅Mysticgeek可以从Google获得更多信息:

209.85.238.9 – – [28/Aug/2007:05:57:25 -0700] “GET /mysticgeek/feed/ HTTP/1.1” 302 568 “-” “Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 111 subscribers; feed-id=5433036316661303107)”

209.85.238.9 – – [28 / Aug / 2007:05:57:25 -0700]“ GET / mysticgeek / feed / HTTP / 1.1” 302568“-”“ Feedfetcher-Google; (+ http://www.google.com/feedfetcher.html; 111个订阅者; feed-id = 5433036316661303107)”

Perhaps I should take a cue from him and start updating my personal blog… but then I would have less time for writing articles.

也许我应该从他那里得到一些启发,并开始更新我的个人博客……但是那样我将有更少的时间来撰写文章。

翻译自: https://www.howtogeek.com/howto/linux/finding-rss-subscriber-counts-through-apache-logs/

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值