I've followed to document at "http://www.ardamis.com/2005/08/11/xampp-apache-namevirtualhost/".

I edited My hosts file at C:\WINDOWS\system32\drivers\etc:

# localhost name resolution is handle within DNS itself.
127.0.0.1       localhost
# ::1             localhost
127.0.0.1 test.localhost
127.0.0.1 test1.com 
127.0.0.1 test2.com 

After editing hosts, I changed attribe into read only.

And httpd.vhosts.conf is:

<VirtualHost *:8080>
ServerName test.wowdns.com
DocumentRoot K:/_web/test_dev
ServerAlias www.test.wowdns.com
php_admin_flag allow_url_fopen On
ServerAdmin test@hotmail.com
ErrorLog K:/apm_packages/xampp/Apache/logs/test_error_log
CustomLog K:/apm_packages/xampp/Apache/logs/test_access_log combined
</VirtualHost>

<VirtualHost *:8080>
ServerName test.localhost 
ServerPath k:/_web/test
DocumentRoot k:/_web/test
 <Directory "k:/_web/test">
     Options -Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
 </Directory>
 </VirtualHost>

But I could not print test.wowdns.com and test.localhost, also 127.0.0.1.

What am i wrong?

Any comment would be appreciated.

    6 days later

    hi hanpedro,

    maybe this will help:

    How To Setup A WAMP Development Environment

    I wrote that a few weeks ago figuring it will help someone, perhaps it will help solve your issue with localhost.

    Start off slowly adding each directive line by line. Don't try to do too much at one shot. Get it up and running THEN add additional directives as you go. The NameVirtualHost directive just tells Apache to use the named virtual host feature. Without it, it is IP based.

      kkobashi,

      Thank you for your kind reply.

      I will study your writings at given link and post result here.

        5 days later

        Hey hanpedro,
        Your vhost file is incorrect. I just wrote a tutorial on doing what you're trying to do the other day. Check out this link and see if this helps explain it:

        http://www.myownserver.info/index.php/step-4-additonal-settings/20-fakedomains.html

        Your VirtualHosts should look something like this:

        <VirtualHost *:8080>
        ServerName test1.com
        DocumentRoot K:/web/test_dev
        ServerAlias www.test1.com
        <Directory "k:/
        web/test_dev">
        Options -Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
        </Directory>
        </VirtualHost>

        <VirtualHost *:8080>
        ServerName test.localhost
        ServerAlias www.test.localhost
        ServerPath k:/web/test
        DocumentRoot k:/
        web/test
        <Directory "k:/_web/test">
        Options -Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
        </Directory>
        </VirtualHost>

        I'm not 100% sure the www. will work, so you may be able to leave the "Server Alias" line off.

        Take a look at my website and you'll find this and much more information regarding configuring XAMPP, installing addons and more. It's all free work I've donated my time in putting together to make it easier for people wanting to know more and spend less time learning it.

          dmphotography,

          Thanks for your kind reply and intruducing good site.
          I will visit and study more.

            Write a Reply...