PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, July 3, 2022

[FIXED] How to setup Virtual Host on XAMPP?

 July 03, 2022     apache, vhosts, xampp     No comments   

Issue

I'm using xampp v7.2.29.

But I can't setup a Virtual Host(vHost). Here is my code:

apache\conf\extra\httpd-vhosts.conf

    <VirtualHost *:80>
    ServerName localhost
    DocumentRoot "E:\xampp\htdocs"
    <Directory "E:\xampp\htdocs">
        Require all granted
    </Directory>
</VirtualHost>


<VirtualHost *:80>
    ServerName local.demoapp.com
    DocumentRoot "E:\xampp\htdocs\DemoApp"
    <Directory "E:\xampp\htdocs\DemoApp">
        Require all granted
    </Directory>
</VirtualHost>

C:\Windows\System32\drivers\etc\host

127.0.0.1       locl.demoapp.com

I'm using the above code but getting this error.

Click to s see error


Solution

You made a typo error on your host file.

Since you used

local.demoapp.com

as your server name, your host file should be

127.0.0.1    local.demoapp.com


Answered By - iRedia Ebikade
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing