怎么样分析蜘蛛日志?
<div style="color: black; text-align: left; margin-bottom: 10px;">
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/44a0f29a1598447f851914af34f121a6~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1725101500&x-signature=Uwct3VvaWS7x8yKM3CtybdTNVP8%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">什么是蜘蛛日志?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">所说</span>的蜘蛛日志<span style="color: black;">便是</span>当搜索引擎向服务器发送请求时产生的<span style="color: black;">拜访</span>记录文件。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">每一个</span>网站都会有日志文件,<span style="color: black;">然则</span><span style="color: black;">非常多</span>时候,日志文件<span style="color: black;">仅有</span>在网站<span style="color: black;">显现</span>问题的时候才会被查阅。在seo方面,日志文件是<span style="color: black;">更易</span>被忽略的<span style="color: black;">一起</span>,<span style="color: black;">然则</span>日志文件<span style="color: black;">针对</span>seo<span style="color: black;">来讲</span>事非常重要的,<span style="color: black;">咱们</span><span style="color: black;">能够</span>在日志文件中获取<span style="color: black;">各样</span>信息并<span style="color: black;">发掘</span>网站存在的<span style="color: black;">有些</span>问题。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">日志<span style="color: black;">能够</span>去哪里拿到?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">日志文件<span style="color: black;">通常</span>是在wwwlog<span style="color: black;">或</span>log<span style="color: black;">这般</span>的文件夹里面<span style="color: black;">能够</span>下载。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">分析<span style="color: black;">重点</span>用什么工具?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">python和loghao</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p26-sign.toutiaoimg.com/pgc-image/360b5fc495174fcfb36915b77fcf4a0c~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1725101500&x-signature=SmBrrcAlPEa4zH%2FtFGsH%2B47Qabk%3D" style="width: 50%; margin-bottom: 20px;"></div>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/2bf683e8cb6e43b29c5696d58b9116fe~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1725101500&x-signature=Zf6bbBfcWx90dwlPoSmz9wqV10A%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在日志中<span style="color: black;">能够</span>查看<span style="color: black;">那些</span>数据?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.客户端的IP<span style="color: black;">位置</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.<span style="color: black;">拜访</span>时间</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3.查看http状态码</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">4.请求方式等等</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">查看蜘蛛日志常用的<span style="color: black;">有些</span>命令</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.cat access.log | grep Baiduspider 命令来获取百度蜘蛛的<span style="color: black;">仔细</span>爬取记录</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.cat access.log | grep Baiduspider | wc -l 命令来统计百度蜘蛛的爬取次数</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3.cat access.log | grep Baiduspider | grep "GET url" 来统计百度蜘蛛爬取某个页面的记录,命令中的url为页面的相对<span style="color: black;">位置</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">grep指令用于<span style="color: black;">查询</span>内容<span style="color: black;">包括</span>指定的范本样式的文件,<span style="color: black;">倘若</span><span style="color: black;">发掘</span>某文件的内容符合所指定的范本样式,预设grep指令会把含有范本样式的那一列<span style="color: black;">表示</span>出来。若不指定任何文件名<span style="color: black;">叫作</span>,或是所给予的文件名为-,则grep指令会从标准输入设备读取数据。在分析日志的时候<span style="color: black;">运用</span>该工具,<span style="color: black;">能够</span>精确找出<span style="color: black;">咱们</span>想看的日志内容,减少筛选时间,<span style="color: black;">提高</span><span style="color: black;">自己</span>的工作效率。<span style="color: black;">能够</span><span style="color: black;">按照</span><span style="color: black;">咱们</span><span style="color: black;">实质</span>的场景,输入关键词来过滤日志。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">蜘蛛日志有何<span style="color: black;">功效</span>?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.<span style="color: black;">经过</span>对蜘蛛日志的分析,<span style="color: black;">咱们</span><span style="color: black;">能够</span><span style="color: black;">晓得</span>蜘蛛<span style="color: black;">是不是</span>对站点进行了抓取,以及抓取<span style="color: black;">是不是</span>成功,判断抓取资源<span style="color: black;">是不是</span>被浪费,<span style="color: black;">亦</span><span style="color: black;">能够</span>判断<span style="color: black;">咱们</span>的网站<span style="color: black;">是不是</span>符合搜索引擎的抓取规范,找到抓取失败的<span style="color: black;">原由</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.<span style="color: black;">倘若</span>某个页面被蜘蛛频繁地抓取,<span style="color: black;">咱们</span><span style="color: black;">能够</span>对这个页面做<span style="color: black;">有些</span><span style="color: black;">调节</span>(<span style="color: black;">例如</span>布局),<span style="color: black;">能够</span>在页面中添加<span style="color: black;">有些</span>链接。但有些频繁地抓取是蜘蛛恶意的抓取,<span style="color: black;">倘若</span>蜘蛛的<span style="color: black;">拜访</span>频率过高,很可能会影响正常服务的运行,<span style="color: black;">经过</span>对蜘蛛日志的分析,<span style="color: black;">能够</span><span style="color: black;">发掘</span>恶意蜘蛛的足迹,<span style="color: black;">而后</span><span style="color: black;">能够</span>限制蜘蛛的<span style="color: black;">拜访</span>频率来<span style="color: black;">保准</span>服务器的稳定。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3.<span style="color: black;">经过</span>分析日志文件,<span style="color: black;">咱们</span><span style="color: black;">能够</span><span style="color: black;">发掘</span>蜘蛛的<span style="color: black;">拜访</span>路径,有次<span style="color: black;">咱们</span><span style="color: black;">能够</span>优化<span style="color: black;">咱们</span>的站点结构。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">总结:利用日志<span style="color: black;">咱们</span><span style="color: black;">能够</span>挖掘到<span style="color: black;">非常多</span>的信息,<span style="color: black;">咱们</span><span style="color: black;">能够</span><span style="color: black;">经过</span>日志中的状态码来分析网站<span style="color: black;">是不是</span>存在问题,如<span style="color: black;">是不是</span>存在死链,页面失效等错误。<span style="color: black;">咱们</span><span style="color: black;">经过</span>日志<span style="color: black;">能够</span><span style="color: black;">发掘</span>用户对整站页面的<span style="color: black;">拜访</span>次数、<span style="color: black;">拜访</span>时间以及<span style="color: black;">拜访</span>路径,<span style="color: black;">经过</span>这些<span style="color: black;">能够</span>分析用户的<span style="color: black;">行径</span>习惯。<span style="color: black;">经过</span>日志<span style="color: black;">咱们</span><span style="color: black;">乃至</span><span style="color: black;">能够</span>防范恶意攻击,<span style="color: black;">因此呢</span>,日志分析在做网站的过程中是必不可少的。</p>
</div>
回顾过去一年,是艰难的一年;展望未来,是辉煌的一年。 你的话语如春风拂面,让我心生暖意。
页:
[1]