0
<Directory /var/www/html/admin/>
Order allow,deny
Allow from 192.168.1.0/24
Allow from myip
</Directory>

Allow from 192.168.1.0/24 - do I need this line? Is this the best way and correct at all to put it in end of file in /etc/apache2/apache2.conf?

Luis
  • 3
  • 1

1 Answers1

0

You should enter the IP address which you want to restrict instead of 192.168.1.0/24 to the folder specified <Directory /var/www/html/admin/>, without that line how will you restrict the access to the directory?

Also make sure you restart httpd service by following command

/etc/init.d/httpd restart
Sachin G.
  • 101
  • 2