title: How to enable Virtual Host on Xampp for Laravel?
body: <p>I have XAMPP running on Windows 7 Pro. I am trying to setup a Virtual Host so that when I use "dev.app" as a domain I get directly to my public folder of laravel installation.</p>
  
  <p>Laravel is located at <code>F:/xampp/htdocs/dev/public</code></p>
  
  <p>I opened the <code>httpd-vhosts.conf</code> file located at <code>F:\xamp\apache\conf\extra\https-vhosts.conf</code></p>
  
  <p>and replaced everything with this</p>
  
  <pre><code># Virtual Hosts
  #
  # Required modules: mod_log_config
  
  # If you want to maintain multiple domains/hostnames on your
  # machine you can setup VirtualHost containers for them. Most configurations
  # use only name-based virtual hosts so the server doesn't need to worry about
  # IP addresses. This is indicated by the asterisks in the directives below.
  #
  # Please see the documentation at 
  # &lt;URL:http://httpd.apache.org/docs/2.4/vhosts/&gt;
  # for further details before you try to setup virtual hosts.
  #
  # You may use the command line option '-S' to verify your virtual host
  # configuration.
  
  #
  # Use name-based virtual hosting.
  #
  
  NameVirtualHost *:80
  
  #
  # VirtualHost example:
  # Almost any Apache directive may go into a VirtualHost container.
  # The first VirtualHost section is used for all requests that do not
  # match a ##ServerName or ##ServerAlias in any &lt;VirtualHost&gt; block.
  #
  
  &lt;VirtualHost localhost&gt;
      DocumentRoot "F:/xampp/htdocs/"
      ServerAdmin admin@localhost
  
      &lt;Directory "F:/xampp/htdocs/"&gt;
          Options Indexes FollowSymLinks
          AllowOverride all
      &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  
  # Development
  &lt;VirtualHost dev.app&gt;
      DocumentRoot "F:/xampp/htdocs/dev/public"
      ServerAdmin admin@localhost
  
      &lt;Directory "F:/xampp/htdocs/dev/public"&gt;
         AllowOverride All
         Order Allow,Deny
         Allow from all
         Require all granted
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>then I opened my hosts file located at <code>C:\Windows\System32\drivers\etc</code> and added changed the localhost line to look like this</p>
  
  <pre><code>127.0.0.1       localhost      dev.app
  127.0.0.1       127.0.0.1
  </code></pre>
  
  <p>However, when I go to dev.app in my browser I get this error</p>
  
  <blockquote>
    <p>Unable to connect</p>
    
    <p>Firefox can't establish a connection to the server at app.dev.</p>
  
  <pre><code>The site could be temporarily unavailable or too busy. Try again in a few moments.
  If you are unable to load any pages, check your computer's network connection.
  If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
  </code></pre>
  </blockquote>
  
  <p>What am I missing here?
  What did I do wrong?</p>
  
  <p><strong>Note:</strong> I restarted Apache after I change the vhosts file. Also, I updated the app.php file in the config folder of laravel to have <code>http://dev.app</code> value in the url.</p>
  
  <p><strong>UPDATED</strong>
  after adding http://.... the site resolve but the images are not showing. </p>