为什么awstats报告我的静态IP而不是域名?

在AWStats下的“从外部页面(除search引擎之外的其他网站)的链接”中,它生成了链接到我的页面的页面列表。 我看到像Bing,YouTube,网页等页面。但是,页面内部有很多内部链接。 接近底部报道如下:

http://72.249.150.9/distributors.php 5 2.4 % http://72.249.150.9/contact/ 5 2.4 % http://72.249.150.9/catalog/ 4 1.9 % http://72.249.150.9/flex-point-hockey-grip.php 5 2.4 % http://72.249.150.9/sticky-grip-foam.php 5 2.4 % http://72.249.150.9/video.php 10 4.8 % http://72.249.150.9/dealers/ 5 2.4 % http://72.249.150.9/feedback/ 5 2.4 % http://72.249.150.9/products.php 10 4.8 % http://72.249.150.9/ergo-hockey-grip.php 5 2.4 % 

注意 :由于SSL要求,静态IP被设置在适当的位置。

因为你的网站也被访问它的IP地址(没有你的域名)。 AWStats不知道这是相同的网站,除非你configurationHostAliasesconfiguration指令。 添加到您的AWStatsconfiguration:

 HostAliases="72.249.150.9" 

另一个解决scheme是将通过IP地址访问您的网站的访问者redirect到您的域名(我会推荐这个)。 你可以用mod_write和.htaccess文件来做到这一点:

 RewriteEngine On RewriteCond %{HTTP_HOST} !.*?your.domain$ [NC] ReWriteRule /(.*)$ http://www.your.domain/$1 [R=301,L] 
 [johnathan@VM:~] $ host 72.249.150.9 Host 9.150.249.72.in-addr.arpa. not found: 3(NXDOMAIN) 

您需要为该IP设置反向DNS,以便您的Web服务器可以将IP映射回域名。 您的ISP通常可以帮助您,或者,如果您从您的家庭IP上运行服务器,请查看dyndns.org提供的免费服务。

 [johnathan@VM:~] $ host 109.xxx.xxx.131 131.26.169.109.in-addr.arpa domain name pointer starscream.xxxxxxxxx.com. [johnathan@VM:~] $ host starscream.xxxxxxxxx.com starscream.xxxxxxxxx.com has address 109.xxx.xxx.131 

这就是你应该得到的回报……仅供参考。

希望这可以帮助 :)