首页 > 解决方案 > Htaccess IP地址拒绝限制

问题描述

我构建了 hta 访问文件,拒绝了我从所有免费代理网站收集的所有代理 ips 列表以及 Ubuntu 18.04 上我的 apache 服务器的一些溢价。它有效并禁止列表。但是,当列表中的 ips 数量可能超过 200 时,它给了我这个错误

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

我打开了日志文件,这就是结果

[Tue Feb 25 02:30:01.233297 2020] [core:alert] [pid 3118] [client 127.0.0.1:48874] /var/www/html/.htaccess: deny requires at least two arguments, 'from' followed by hostnames or IP-address wildcards

我不知道出了什么问题,因为它适用于少量 ips 但不是很多 (10000 ips) 感谢您的帮助

标签: apache.htaccessinternal-server-error

解决方案


我找到了解决方案,我的 ip 列表之一是空的

deny from 47.73.177.8192
deny from
deny from 132.478.372.478

谢谢你的帮助


推荐阅读