简体   繁体   English

如果Nginx错误日志中有可疑条目,该怎么办

[英]What to do if there are suspicious entries in nginx error log

I'm very very new with server stuff and I have just setup a server with nginx 1.11 and php7. 我对服务器方面的知识非常陌生,我刚刚使用nginx 1.11和php7设置了服务器。

While I was still configuring my project paths, I often check with the nginx error logs. 当我仍在配置项目路径时,我经常检查nginx错误日志。 I noticed there are from suspicious host listed there. 我注意到那里列出了可疑主机。 For sure I don't own any 7ammart.com 当然,我没有任何7ammart.com

What should I do?? 我该怎么办?? How do I stop it? 如何停止? How will I know where it was running from? 我怎么知道它从哪里跑?

Here is the error log: 这是错误日志:

2016/09/11 10:19:19 [error] 3315#3315: *1 open() "/usr/share/nginx/html/robots.txt" failed (2: No such file or directory), client: 162.210.196.130, server: localhost, request: "GET /robots.txt HTTP/1.0", host: "7ammart.com"
2016/09/11 10:19:21 [error] 3315#3315: *2 "/usr/share/nginx/html/index.php/catalog/product_compare/add/product/1/uenc/aHR0cDovLzdhbW1hcnQuY29tL2luZGV4LnBocC9ob21lLWZ1cm5pdHVyZS9wb3RhdG8uaHRtbA,,/form_key/uo0p87myURTXoki5/index.html" is not found (2: No such file or directory), client: 162.210.196.130, server: localhost, request: "GET /index.php/catalog/product_compare/add/product/1/uenc/aHR0cDovLzdhbW1hcnQuY29tL2luZGV4LnBocC9ob21lLWZ1cm5pdHVyZS9wb3RhdG8uaHRtbA,,/form_key/uo0p87myURTXoki5/ HTTP/1.0", host: "7ammart.com"
2016/09/11 10:19:23 [error] 3315#3315: *3 "/usr/share/nginx/html/index.php/wishlist/index/add/product/1/form_key/uo0p87myURTXoki5/index.html" is not found (2: No such file or directory), client: 162.210.196.130, server: localhost, request: "GET /index.php/wishlist/index/add/product/1/form_key/uo0p87myURTXoki5/ HTTP/1.0", host: "7ammart.com"

I can't believe I have just set this up today and there is already a suspicious activty 我简直不敢相信我今天刚刚进行了设置,并且已经有可疑活动

7ammart.com is the hostname of a server which is running a web crawler . 7ammart.com是运行web crawler 7ammart.com器的服务器的hostname Trying to crawl your website. 尝试抓取您的网站。

Looks like you don't have a robots.txt , please add one. 看起来您没有robots.txt ,请添加一个。 There is a guide here , which explains how to do that. 有一个指导这里 ,这也解释了如何做到这一点。

You can make rules to deny or allow bots. 您可以制定规则来拒绝或允许漫游器。

Place the file at the root from where your html is served. 将文件放在html的根目录下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM