Local Domain Name in Windows


This a simple tutorial on how to create a local domain name in windows using Apache.

First go to C:\Windows\System32\drivers\etc and edit the hosts file using notepad
Second add this inside the hosts file 127.0.0.1 http://www.yourdomain.com
Third go to your apache\conf\extra and edit httpd-vhosts.conf and add the text below

DocumentRoot “C:\xampp\htdocs\your_web_app_folder
ServerName http://www.yourdomain.com

Next go to apache\conf and open httpd.conf and uncomment Include conf/extra/httpd-vhosts.conf

Save everything and restart Apache

Then try to access http://www.yourdomain.com

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: