Reputation:
in reference to this documentation https://httpd.apache.org/docs/2.4/howto/access.html and https://httpd.apache.org/docs/2.4/mod/mod_authz_host.html#requiredirectives , in which file should the directives be inserted? e.g. 'Require ip 127.0.0.1' I'm talking about configuration of apache2 in debian, I want limit access for all except for 127.0.0.1, localhost. Thanks
Upvotes: 1
Views: 94
Reputation:
ok, I solved it. the right file to enter the configuration is /etc/apache2/apache2.conf this is the configuration:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
# Require all granted
Require host localhost
# Require all denied
</Directory>
Upvotes: 0
Reputation: 469
You can set the IP you wanna grant access in the configuration file of your VirtualHost (default one is on /etc/apache2/sites-avaiable/000-default.conf)
Upvotes: 2