<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?
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