How to create, setup and enable the local virtual host in XAMPP Server on Windows 10

Posted by : at

Category : Hosting


In This Article, we will learn How to Create, Setup and Enable a Virtual host in XAMPP On windows by following the below simple steps:

First We need go to XAMPP’s apache directory then navigate to conf\extra named folder:

F:\coding\apache\conf\extra

Open ‘httpd-vhosts.conf’ named file and paste your expected virtual host URL:

#For Example virtual host URL: localhost.coderaman594.com <VirtualHost *:80> ServerAdmin webmaster@localhost.com DocumentRoot F:\coding\htdocs\coderaman594 ServerName localhost.coderaman594.com </VirtualHost>

Navigate to etc directory-

cd C:\Windows\System32\drivers\etc\

Edit the hosts named file in editor with administrator permissions then put your localhost url with ip address:

127.0.0.1 localhost.coderaman594.com

Finally, Restart your apache service with the help of XAMPP control Panel, and try to check your localhost URL in any web browser.


About Aman Suryawanshi

Senior Software Engineer @ TCS

Star
Categories