title: How to remove port number from http://localhost:8123 to use as http://localhost?
body: <p>I had to change my default apache port number 80 to 8123 (just random number)</p>
  
  <p>I changed the following files ..</p>
  
  <p><strong>httpd.conf</strong></p>
  
  <pre><code>Listen 8123
  ServerName localhost:8123
  </code></pre>
  
  <p><strong>httpd-vhosts.conf</strong></p>
  
  <pre><code>NameVirtualHost *:8123
  &lt;VirtualHost *:8123&gt;
    ServerName localhost
    DocumentRoot "C:/xampp/htdocs"
    DirectoryIndex index.php
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p><strong>Windows Hosts file</strong></p>
  
  <pre><code>127.0.0.1:8123     localhost
  ::1:8123           localhost
  </code></pre>
  
  <p>I am using Windows 7. </p>
  
  <p>After making all these changes, I restarted apache but I am still unable to access <code>http://localhost</code> .... however <code>http://localhost:8123</code> works fine ... can someone help me find what I am doing wrong here? thanks</p>