我编辑了我的 apache2.conf(在 Ubuntu 上)以限制除了一个 IP 之外的所有访问,但我仍然可以从其他 IP 访问。下面是我的配置:
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require ip x.x.x.x
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require ip x.x.x.x
</Directory>
Run Code Online (Sandbox Code Playgroud)
authz_core 模块已加载,有什么问题吗?谢谢。
apache-2.4 ×1