apache - 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) 感谢您的帮助
解决方案
我找到了解决方案,我的 ip 列表之一是空的
deny from 47.73.177.8192
deny from
deny from 132.478.372.478
谢谢你的帮助
推荐阅读
- javascript - 根据数据属性设置cookie
- triggers - Zabbix 3.4.15 发现触发器:如何在触发器名称中添加发现参数{#SERIAL}?
- excel - 根据某些特定字符提取字符串
- ios - 如何在 Apple Connect 中获取 ProductID?(应用内购买)
- c# - 我在我的服务总线队列中调用了一个长时间运行的进程。我希望它持续超过 5 分钟
- c++ - 分离线程中的竞争条件
- python - 从 Python 3.5 升级到 3.7,但 IPython 仍然使用 3.5
- python - Python Script 自己运行了两次
- php - 如何检查相同键对的多维数组,即完全相同的键但值可能不同?
- regex - 使用 Perl 在 Excel 文件中存储数组值