我遇到了一个问题。下面我放了错误日志:
2021/06/01 12:15:27 [error] 208524#0: *17 open() "/usr/share/nginx/html/myadmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /myadmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:28 [error] 208524#0: *17 open() "/usr/share/nginx/html/myadmin2/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /myadmin2/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:28 [error] 208524#0: *17 open() "/usr/share/nginx/html/xampp/phpmyadmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /xampp/phpmyadmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:28 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyadmin_bak/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyadmin_bak/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:28 [error] 208524#0: *17 open() "/usr/share/nginx/html/www/phpMyAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /www/phpMyAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:29 [error] 208524#0: *17 open() "/usr/share/nginx/html/tools/phpMyAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /tools/phpMyAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:29 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpmyadmin-old/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpmyadmin-old/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:29 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdminold/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdminold/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:29 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmin.old/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmin.old/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:30 [error] 208524#0: *17 open() "/usr/share/nginx/html/pma-old/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /pma-old/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:30 [error] 208524#0: *17 open() "/usr/share/nginx/html/claroline/phpMyAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /claroline/phpMyAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:30 [error] 208524#0: *17 open() "/usr/share/nginx/html/typo3/phpmyadmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /typo3/phpmyadmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:30 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpma/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpma/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:31 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpmyadmin/phpmyadmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpmyadmin/phpmyadmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:31 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmin/phpMyAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmin/phpMyAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:31 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAbmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAbmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:32 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmin__/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmin__/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:32 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmin+++---/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmin+++---/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:32 [error] 208524#0: *17 open() "/usr/share/nginx/html/v/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /v/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:32 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpmyadm1n/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpmyadm1n/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:33 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdm1n/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdm1n/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:33 [error] 208524#0: *17 open() "/usr/share/nginx/html/shaAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /shaAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:33 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyadmi/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyadmi/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:34 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmion/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmion/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:34 [error] 208524#0: *17 open() "/usr/share/nginx/html/s/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /s/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:34 [error] 208524#0: *17 open() "/usr/share/nginx/html/MyAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /MyAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:35 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmin1/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmin1/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:35 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmin123/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmin123/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:35 [error] 208524#0: *17 open() "/usr/share/nginx/html/pwd/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /pwd/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:35 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmina/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmina/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:36 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMydmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMydmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:36 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmins/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmins/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:36 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmin._/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmin._/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:36 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmin._2/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmin._2/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:37 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpmyadmin2222/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpmyadmin2222/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:37 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmin333/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmin333/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:37 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpmyadmin3333/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpmyadmin3333/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:37 [error] 208524#0: *17 open() "/usr/share/nginx/html/php2MyAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /php2MyAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:38 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpiMyAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpiMyAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:38 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpNyAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpNyAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:38 [error] 208524#0: *17 open() "/usr/share/nginx/html/1/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /1/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:39 [error] 208524#0: *17 open() "/usr/share/nginx/html/download/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /download/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:39 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmin_111/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmin_111/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:39 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpmadmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpmadmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:39 [error] 208524#0: *17 open() "/usr/share/nginx/html/321/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /321/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:40 [error] 208524#0: *17 open() "/usr/share/nginx/html/123131/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /123131/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:40 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdminn/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdminn/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:41 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdminhf/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdminhf/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:41 [error] 208524#0: *17 open() "/usr/share/nginx/html/sbb/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /sbb/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:41 [error] 208524#0: *17 open() "/usr/share/nginx/html/WWW/phpMyAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /WWW/phpMyAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:42 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmln/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmln/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:42 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpMyAdmin_ai/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpMyAdmin_ai/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:42 [error] 208524#0: *17 open() "/usr/share/nginx/html/__phpMyAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /__phpMyAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:42 [error] 208524#0: *17 open() "/usr/share/nginx/html/program/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /program/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:43 [error] 208524#0: *17 open() "/usr/share/nginx/html/shopdb/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /shopdb/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:43 [error] 208524#0: *17 open() "/usr/share/nginx/html/phppma/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phppma/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:43 [error] 208524#0: *17 open() "/usr/share/nginx/html/phpmy/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /phpmy/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:44 [error] 208524#0: *17 open() "/usr/share/nginx/html/mysql/admin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /mysql/admin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:46 [error] 208524#0: *17 open() "/usr/share/nginx/html/mysql/dbadmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /mysql/dbadmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:46 [error] 208524#0: *17 open() "/usr/share/nginx/html/mysql/sqlmanager/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /mysql/sqlmanager/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:47 [error] 208524#0: *17 open() "/usr/share/nginx/html/mysql/mysqlmanager/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /mysql/mysqlmanager/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:47 [error] 208524#0: *17 open() "/usr/share/nginx/html/wp-content/plugins/portable-phpmyadmin/wp-pma-mod/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /wp-content/plugins/portable-phpmyadmin/wp-pma-mod/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:47 [error] 208524#0: *17 open() "/usr/share/nginx/html/sqladmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /sqladmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:48 [error] 208524#0: *17 open() "/usr/share/nginx/html/sql/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /sql/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:49 [error] 208524#0: *17 open() "/usr/share/nginx/html/SQL/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /SQL/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:49 [error] 208524#0: *17 open() "/usr/share/nginx/html/websql/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /websql/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:50 [error] 208524#0: *17 open() "/usr/share/nginx/html/MySQLAdmin/index.php" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /MySQLAdmin/index.php HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:53 [error] 208524#0: *17 open() "/usr/share/nginx/html/manager/html" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /manager/html HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:54 [error] 208524#0: *17 open() "/usr/share/nginx/html/axis2/axis2-admin/login" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "POST /axis2/axis2-admin/login HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:54 [error] 208524#0: *17 open() "/usr/share/nginx/html/login" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /login HTTP/1.1", host: "95.141.35.62"
2021/06/01 12:15:55 [error] 208524#0: *17 open() "/usr/share/nginx/html/jenkins/login" failed (2: No such file or directory), client: 123.18.206.22, server: 95.141.35.62, request: "GET /jenkins/login HTTP/1.1", host: "95.141.35.62"
有人能帮我了解如何防止这些错误吗?我想澄清一下,当我甚至没有登录服务器时,它们就出现了。在 nginx.conf 文件中,我已经设置好了所有位置和文件。在服务器上,我只安装了 nginx,没有安装其他任何东西。但似乎服务器找不到重要的东西……有人能帮我吗?谢谢
答案1
你无法阻止这种情况发生,也不必担心
这些“错误”会发生在有人(或更可能是某物) 向你的网络服务器请求一个不存在的文件。
这样的错误消息可能是您的网站出现错误并表明链接无效,但这里的情况并非如此。
每当一个系统可以广泛地访问互联网并响应连接请求时,您几乎会立即且持续地看到(大部分是自动的)探测器进行此类连接。
一旦连接到网络服务器,此类探测器将尝试抓取您的网站(例如,为搜索引擎索引您的网站),或者更常见的是,它们将尝试确定您正在运行的软件及其版本。
一旦发现特定的软件包,您通常会看到随后尝试滥用该包中已知的漏洞。
"/usr/share/nginx/html/phpMydmin/index.php" failed (2: No such file or directory)
例如,这会查找 phpMyAdmin,它通常安装在默认目录中phpMyAdmin
(并且经常公开访问但不定期更新,这使其容易受到新版本中经常发现、披露和修复的许多新漏洞之一的攻击)。
您没有安装 phpMyAdmin(在那里),因此出现“文件未找到”错误。然后探测器继续尝试在其他常见位置定位它,/xampp/phpmyadmin/
等等/tools/phpMyAdmin/
。如果失败,探测器可能会扫描其他常用安装的工具,或转到下一个 IP 地址。
答案2
大多数请求都是针对某个 IP 地址,而不是某个特定域名。如果虚拟主机是default
虚拟主机,则意味着所有请求都由该块处理。
您应该为自己的域创建一个虚拟主机,并禁用默认虚拟主机的日志记录。
配置看起来是这样的:
server {
listen 80 default_server; # Make default virtual host
server_name _; # Dummy host name
access_log off; # Disable access.log
return 404; # Return 404 error to all requests
}
server {
listen 80; # Listen to HTTP port
server_name example.com; # Domain name for the virtual host
... # Rest of the configuration
}
但是,一旦机器人知道了您的域名,您就会获得这些请求的份额。然后,您可以通过匹配访问者绝对不会使用的用户代理来进一步过滤请求。
另一种选择是使用像 Cloudflare 这样的提供商来过滤大部分流量,以使其不会到达您的服务器。