title: XAMPP Default Virtual Host
body: <p>I have a VPS and I have installed XAMPP in it, with all security configured. I have enabled vhosts. I have a <code>db.example.com</code> which will open <code>phpMyAdmin</code> directly on web.</p>
  
  <p>The entry in <code>httpd-vhosts.conf</code> as follows:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerAdmin admin@example.com
      DocumentRoot "/opt/lampp/phpmyadmin"
      ServerName db.example.com
      ServerAlias www.db.example.com
      ErrorLog "logs/db.example.com-error_log"
      CustomLog "logs/db.example.com-access_log" common
          &lt;Directory "/opt/lampp/phpmyadmin"&gt;
                  Options Indexes FollowSymLinks ExecCGI Includes
                  AllowOverride All
                  Require all granted
          &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Let's assume <code>1.2.3.4</code> is my IP for example.com. For accessing db.example.com (1.2.3.4), I will add the entry in my local <code>/etc/hosts</code> file.</p>
  
  <p>I also have other entries in my <code>httpd-vhsots.conf</code> for other subdomains, which are working perfectly. To be noted, the <code>vhosts</code> entry for <code>db.example.com</code> is <strong>first</strong> in the file <code>httpd-vhsost.conf</code></p>
  
  <p><strong>Now this is the issue:</strong></p>
  
  <p>When I open the IP <code>1.2.3.4</code> directly in my browser, <code>phpMyAdmin</code> opens, which should not happen actually. How to avoid this? I have no clue why this happens. </p>
  
  <p>PS: I removed my local entry for db.example.com in <code>/etc/hosts</code></p>