Virtual Host configuration for windows operating system ( XAMPP SERVER )


Virtual Host configuration for windows operating system ( XAMPP SERVER ).

1. Open the file hosts from ( C:\Windows\System32\drivers\etc\hosts )

127.0.0.1   www.testurl.com

2. Then open the httpd-vhosts.conf for xampp server from (  C:\xampp\apache\conf\extra\httpd-vhosts.conf )

# Be sure to only have this line once in your configuration
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
    DocumentRoot C:/xampp/htdocs/
    ServerName localhost
    ServerAdmin admin@localhost
</VirtualHost>

# This is the configuration for www.testurl.com
<VirtualHost *:80>
    DocumentRoot "C:\wamp\www\project_dir"
    ServerName www.testurl.com
    DirectoryIndex index.php
    <Directory C:/wamp/www/>
      Order Deny,Allow   
      Allow from all 
    </Directory>
</VirtualHost>
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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s