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

Problems with the Windows version of XAMPP, questions, comments, and anything related.

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

Postby GmMc » 27. September 2014 12:36

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.
Last edited by GmMc on 27. September 2014 14:23, edited 1 time in total.
GmMc
 
Posts: 2
Joined: 27. September 2014 12:23
Operating System: Windows 7

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

Postby GmMc » 27. September 2014 14:23

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
GmMc
 
Posts: 2
Joined: 27. September 2014 12:23
Operating System: Windows 7

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

Postby Nobbie » 27. September 2014 14:45

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
Nobbie
 
Posts: 13177
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 176 guests