2023/05/07 23:59:37 [error] 2541806#0: *25943 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 221.218.213.109, server: _, request: "GET /goip.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "123.24.199.152"
2023/05/07 23:59:46 [error] 2541806#0: *25943 "/usr/share/nginx/html/goip/index.php" is not found (2: No such file or directory), client: 221.218.213.109, server: _, request: "GET /goip/ HTTP/1.1", host: ""
2023/05/07 23:59:46 [error] 2541806#0: *25943 open() "/usr/share/nginx/html/goip/nginx-logo.png" failed (2: No such file or directory), client: 221.218.213.109, server: _, request: "GET /goip/nginx-logo.png HTTP/1.1", host: "123.24.199.152", referrer: "http://123.24.199.152/goip/"
2023/05/07 23:59:46 [error] 2541806#0: *25942 open() "/usr/share/nginx/html/goip/poweredby.png" failed (2: No such file or directory), client: 221.218.213.109, server: _, request: "GET /goip/poweredby.png HTTP/1.1", host: "123.24.199.152", referrer: "http://123.24.199.152/goip/"
2023/05/08 00:06:12 [error] 2541806#0: *25947 "/usr/share/nginx/html/goip/index.php" is not found (2: No such file or directory), client: 220.196.160.45, server: _, request: "GET /goip/ HTTP/1.1", host: "123.24.199.152"
2023/05/08 00:08:48 [error] 2541806#0: *25959 open() "/usr/share/nginx/html/goip/nginx-logo.png" failed (2: No such file or directory), client: 1.13.140.102, server: _, request: "GET /goip/nginx-logo.png HTTP/1.1", host: "123.24.199.152", referrer: "http://123.24.199.152/goip/"
2023/05/08 00:13:25 [error] 2541806#0: *25961 open() "/usr/share/nginx/html/goip" failed (2: No such file or directory), client: 129.211.162.23, server: _, request: "GET /goip HTTP/1.1", host: "123.24.199.152"
查看nginx 日志每天有大量的国外ip访问服务器,为防止这些访问
将nginx.conf 中的默认注释掉
# server { # listen 80 default_server; # listen [::]:80 default_server; # server_name _; # root /usr/share/nginx/html; # # # Load configuration files for the default server block. # include /etc/nginx/default.d/*.conf; # # location / { # } # # error_page 404 /404.html; # location = /40x.html { # } # # error_page 500 502 503 504 /50x.html; # location = /50x.html { # } # }
这样就会访问你自定义的域名地址。
在使用相应的zblog插件 限制国外ip访问。即可。
最好是能从 服务器防火墙(配置复杂)
云防火墙(收费)