0

Hi Wonder if anyone can help.

I have trying to get virtual hosts working on a local installation of xampp with not much success for the last few hours, all the numerous examples I have tried just seem to point to the same thing - it looks pretty simple, set hosts & add into httpd-vhosts.

The hosts file part seems to be working but I'm unsure about the virtual host part.

The problem is it just loads up the xampp welcome page.

Ideally I want to set up so the virtual hosts point to a mapped drive, but for the moment I'd be happy with just pointing to a folder in the htdocs !

Is there a way to check that my virtual hosts part is working ?

Thanks

MRO

Use name-based virtual hosting. # NameVirtualHost *:80

#ServerAdmin webmaster@localhost DocumentRoot "C:/xampp/htdocs/testdomain" ServerName www.testdomain.com ##ServerAlias www.dummy-host.localhost ##ErrorLog "logs/dummy-host.localhost-error.log" ##CustomLog "logs/dummy-host.localhost-access.log" combined #Options Indexes FollowSymLinks Includes ExecCGI

localhost name resolution is handled within DNS itself.

127.0.0.1       localhost
#::1             localhost

virtual hosts

127.0.0.1 www.testdomain.com

1 Answer 1

0

Try removing the # from this lines

NameVirtualHost *:80

and

ServerAlias www.dummy-host.localhost

Change www.dummy-host.localhost to www.testdomain.com

Then restart xampp.

I believe you would also need to add this to your hosts

127.0.0.1 www.testdomain.com

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .