Virtual Domain and subdomain in localhost [xampp]


Adding a Virtual Host is a 2-step process:

1. Add a new entry to your computer’s hosts file.

File path :  /system32/driver/etc/host localhost
::1 localhost

Add following line in host file

2. Edit the Apache configuration file to accept Virtual Hosts and define the particular Virtual Hosts you want to setup on your computer.

File Path : /apache/conf/extra/httpd-vhosts.conf

Add Following code in httpd-vhosts.conf file

<VirtualHost *>

DocumentRoot "E:\xampp\htdocs\example"
<Directory "E:\xampp\htdocs\example">
Order allow,deny
Allow from all

Accept wildcard subdomains

Allow any subdomain for

<VirtualHost *>
ServerAlias *
DocumentRoot "E:\xampp\htdocs\j9d"

View original post


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s