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.