title: To allow only localhost in Apache's 000-default
body: <p><strong>How can you allow only localhost in Apache2?</strong></p>
  
  <p><em>My /etc/apache2/sites-enabled/000-default is</em></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ServerAdmin webmaster@localhost
  
  DocumentRoot /home/masi/Dropbox/a
  &lt;Directory /&gt;
                  Options FollowSymLinks
                  AllowOverride None
          &lt;/Directory&gt;
          &lt;Directory /home/masi/Dropbox/a/&gt;
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride None
                  Order allow,deny
                  deny from all                             // Problem HERE!
          allow from 127.0.0.1
          &lt;/Directory&gt;
  
          ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
          &lt;Directory "/usr/lib/cgi-bin"&gt;
                  AllowOverride None
                  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                  Order allow,deny
                  Allow from all
          &lt;/Directory&gt;
  
          ErrorLog /var/log/apache2/error.log
  
          # Possible values include: debug, info, notice, warn, error, crit,
          # alert, emerg.
          LogLevel warn
  
          CustomLog /var/log/apache2/access.log combined
  
      Alias /doc/ "/usr/share/doc/"
      &lt;Directory "/usr/share/doc/"&gt;
          Options Indexes MultiViews FollowSymLinks
          AllowOverride None
          Order deny,allow
          Deny from all
          Allow from 127.0.0.0/255.0.0.0 ::1/128
      &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I browse to <code>http://localhost/index.php</code> unsuccessfully. I get <code>Forbidden</code>.</p>