Page 1 of 1

How to configure XAMPP with DNS server to point to a folder?

PostPosted: 27. September 2014 12:36
by GmMc
How do I get for example http://mysitename.randomfreednshost to point to C:/xampp/htdocs/webpages/mysite ? I though I could just add

<VirtualHost mysitename.randomfreednshost>
DocumentRoot C:/xampp/htdocs/webpages/mysite
ServerName mysitename.randomfreednshost
</VirtualHost>

to httpd-vhosts.conf like I have done with 127.0.0.2 etc for my different sites. But when I go to mysitename.randomfreednshost.net after restarting apache I end up on the "New XAMPP security concept:" page at mysitename.randomfreednshost.net/xampp/

What am I doing wrong? I am sure it is something simple but all the tutorials etc tell me to put the above in my httpd-vhosts.conf or variations of it.

Re: How to configure XAMPP with DNS server to point to a fol

PostPosted: 27. September 2014 14:23
by GmMc
OK if I put

<VirtualHost *:80>

there it works but then everything goes there, type in localhost and I go to C:/xampp/htdocs/webpages/mysite

Re: How to configure XAMPP with DNS server to point to a fol

PostPosted: 27. September 2014 14:45
by Nobbie
You must create different VirualHosts for mysitename.randomfreednshost and for localhost.

If in doubt, read the original documentation: http://httpd.apache.org/docs/current/en/vhosts/

You will find many usefull examples on: http://httpd.apache.org/docs/current/vh ... mples.html