I'm using ubuntu 15.04 with apache2 I add this code below to make my web site only accessible from localhost
<Directory />
Order deny,allow
Deny from all
Allow from localhost
Options -Indexes -ExecCGI
</Directory>
but unfortunately this don't give me permission I know that the order of allow and deny is important, here I'm excpecting that apache2 deny from any host or ip and then just allow localhost, Do what I said is right or I'm misunderstanding how this works ?
I solved the problem by replacing this line
Allow from localhostby this oneAllow from 127.0.0.1I hope someone explain to me why should I use the
IPinstead oflocahost