title: Wamp Apache - Allow localhost
body: <p>There are other questions similar to this but don't answer my problem.</p>
  
  <p>This is the default <code>httpd.conf</code>:</p>
  
  <pre><code>&lt;Directory "C:/wamp/www/"&gt;
      Options Indexes FollowSymLinks
      AllowOverride all
  #   onlineoffline tag - don't remove
      Order Deny,Allow
      Deny from all
      Allow from 127.0.0.1
  &lt;/Directory&gt;
  </code></pre>
  
  <p>and it allows only <code>127.0.0.1</code>, but I want to allow also <code>localhost</code> and <code>192.168.x.x</code> (my private ip). </p>
  
  <p>Well, the other answers are: put <code>Allow from all</code> and uncomment in <code>hosts</code> file the line <code>127.0.0.1 localhost</code>; but I read that is unsecure or not reccomended. </p>
  
  <p>So I've tried this:</p>
  
  <pre><code>&lt;Directory "C:/wamp/www/"&gt;
      Options Indexes FollowSymLinks
      AllowOverride all
  #   onlineoffline tag - don't remove
      Order Deny,Allow
      Deny from all
      Allow from 127.0.0.1
      Allow from 192.168.x.x
      Allow from localhost
  &lt;/Directory&gt;
  </code></pre>
  
  <p>It works for <code>192.168.x.x</code>, but not for <code>localhost</code> (gets error: <em>403 Forbidden, You don't have permission to access / on this server.</em>)</p>
  
  <p>1) How can make it works?</p>
  
  <p>2) Maybe is required to uncomment in <code>hosts</code> file the line <code>127.0.0.1 localhost</code> ?</p>
  
  <p>3) Is it really more secure than Allow from all?</p>