title: Apache redirects to localhost
body: <p>I set up WAMP 3.1.9 on my laptop and want to access the website from LAN using my phone. Apache version is 2.4.39, I replaced the default virtualhost settings in the httpd-vhosts.conf file with the following:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
    ServerName localhost
    DocumentRoot "${INSTALL_DIR}/www"
    &lt;Directory "${INSTALL_DIR}/www/"&gt;
      AllowOverride All
      Require all granted
    &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I am using windows 10 and added httpd.exe to the firewall exceptions.</p>
  
  <p>The problem is that, when I access my laptops LAN ip (192.168.2.8) from my phone, I get a "could not establish connection" error. When I look at the sites adress, it says 'localhost' instead of the LAN ip, so I'm suspecting that Apache redirects the request to localhost, but I cannot find the setting which does this nor am I able to find this online.</p>
  
  <hr>
  
  <p>I <strong>solved it</strong> by reinstalling WAMP</p>
  
  <ol>
  <li>I am now using using version 3.2.0.</li>
  <li>Edited <em>httpd-vhosts.conf</em> and changed the line <code>Require local</code> to <code>Require all granted</code>.</li>
  <li>Restarted all services</li>
  <li>Cleared history of my phone</li>
  <li>Attempted to reach the site from my phone, resulted in a connection time out but no redirect.</li>
  <li>Added httpd.exe as an exception to windows firewall. This is done by: start > type: Windows Defender Firewall > Allow app or feature ... > change settings > allow another app.. > browse > C:\wamp64\bin\apache\apache2.4.41\bin\httpd.exe > add > ok</li>
  <li>cleared history of phone again.</li>
  <li>Successfully reached the site on my laptop.</li>
  </ol>