I edited my apache2.conf (on Ubuntu) to restrict access to all except from one IP, but I still can access from other IPs. Below is my configuration:
<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>
authz_core module is loaded, so is there something wrong? Thanks.
Best Answer
Example of access restriction from IP addresses for Apache 2.4:
Don't forget to restart apache service by running this command:
Also don't use
directory /
for security reasons.