【问题标题】:How can I pull a specific IP from an NGIX server wordpress blog acces log如何从 NGINX 服务器 wordpress 博客访问日志中提取特定 IP
【发布时间】:2012-12-14 19:07:20
【问题描述】:

这是一个非常具体的问题,我不太熟悉 NGIX 或 Wordpress,但情况就是这样。

我正在尝试解析与特定表单提交相关的 IP 地址的访问日志文件。

表单位于本地路径 /about/ 但在日志中我找不到任何与此请求匹配的页面,我认为这是由于 wordpress 路由系统造成的。表单html是这样的

 <form action="/about/#wpcf7-f7730-p2-o1" method="post" class="wpcf7-form">
 <div style="display: none;">
 <input type="hidden" name="_wpcf7" value="7730">
 <input type="hidden" name="_wpcf7_version" value="3.3.2">
 <input type="hidden" name="_wpcf7_unit_tag" value="wpcf7-f7730-p2-o1">
 <input type="hidden" name="_wpnonce" value="79e7f7dc53">
 </div>
 <p>Your Name (required)<br>
 <span class="wpcf7-form-control-wrap your-name"><input type="text" name="your-name" value="" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" size="40">       </span> </p>
<p>Your Email (required)<br>
<span class="wpcf7-form-control-wrap your-email"><input type="text" name="your-email"   value="" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required  wpcf7-validates-as-email" size="40"></span> </p>
<p>Subject<br>
<span class="wpcf7-form-control-wrap your-subject"><input type="text" name="your-subject" value="" class="wpcf7-form-control wpcf7-text" size="40"></span> </p>
<p>Your Message<br>
<span class="wpcf7-form-control-wrap your-message"><textarea name="your-message" class="wpcf7-form-control  wpcf7-textarea" cols="40" rows="10"></textarea></span> </p>
<p><input type="submit" value="Send" class="wpcf7-form-control  wpcf7-submit"><img class="ajax-loader" src="http://outoftheboxfood.com/wp-content/plugins/contact-form- 7/images/ajax-loader.gif" alt="Sending ..." style="visibility: hidden;"></p>
<div class="wpcf7-response-output wpcf7-display-none"></div>
</form>

我有访问日志,但不知道要查找什么来查找此表单的任何提交。

【问题讨论】:

  • 我认为操作链接/about/#wpcf7-f7730-p2-o1,我猜是表单的相同 URL,是您应该在服务器日志中查找的内容。

标签: wordpress apache logging nginx


【解决方案1】:

从访问日志中获取另一行,以便您了解另一页的外观。它可能看起来像 /?p=3453 或只是 /page-slug 没有以下斜线。

在第一种情况下,您必须找到关于页面的 id,然后在日志中查找它。

如果你不需要自动寻找 ip,你可以在 shell 中使用 grep:

grep '/the-page-pattern' access.log

【讨论】:

    猜你喜欢
    • 2010-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多