title: Create a Virtual Host in Xamp Windows 10
body: <p>Last night I have updated my windows 7 to windows 10.</p>
  
  <p>The result is struggle trying to run my local apache server in windows 10 that is running on windows 7.I have tried uninstalling and installing another versions of xampp then I came up that I have to change the apache's default port just to make it run.</p>
  
  <p>I changed httpd.conf</p>
  
  <p>from <strong><code>Listen 80</code></strong> to <strong><code>Listen 1234</code></strong></p>
  
  <p>AND
  <strong><code>ServerName localhost:80</code></strong> to <strong><code>ServerName localhost:1234</code></strong></p>
  
  <p>and in <strong>xampp control panel Config->Service and Port Settings</strong>. I also change the Main Port
  <a href="https://i.stack.imgur.com/87An2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/87An2.png" alt="enter image description here"></a></p>
  
  <p>Now I can access phpmyadmin using <strong><code>localhost:1234/phpmyadmin</code></strong>.
  And now my problem is creating Virtual host</p>
  
  <p>so I added in my host(C:\Windows\System32\drivers\etc\hosts) file </p>
  
  <pre><code>127.0.0.1       sample.local
  127.0.0.1       anothersample.local
  </code></pre>
  
  <p>And my vhost (D:\xampp\apache\conf\extra\httpd-vhosts.conf) file</p>
  
  <pre><code>&lt;VirtualHost *:1234&gt;
      DocumentRoot "D:/xampp/htdocs/sample"
      ServerName sample.local
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:1234&gt;
      DocumentRoot "D:/xampp/htdocs/anothersample"
      ServerName anothersample.local
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I did make sure the vhost file above was include 
  <a href="https://i.stack.imgur.com/6bWKu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6bWKu.png" alt="enter image description here"></a></p>
  
  <p>I already restarted my apache but seems like my vhost is not working .Can anyone point out what i missed?</p>