Page 1 of 1

WIN 10 with XAMPP 7.0.9 - local hosts

PostPosted: 16. October 2016 13:23
by dmreed
I am running Win 10 Pro 64x with XAMPP 7.0.9. I have two directories which I need to access as local hosts: g:/8081dmreed and g:/8082devsite.

I have searched the web quite a bit for an answer and have not found an answer to my need

Can someone who is actually using WIN 10 (preferably x64) with XAMPP 7.0.9, please provide me exact code for the Windows "hosts" file and the Apache files httpd.conf, httpd-vhosts.conf, and any required additional files.

Re: WIN 10 with XAMPP 7.0.9 - local hosts

PostPosted: 16. October 2016 21:50
by Nobbie
dmreed wrote:I am running Win 10 Pro 64x with XAMPP 7.0.9. I have two directories which I need to access as local hosts: g:/8081dmreed and g:/8082devsite.


It is impossible to access more than one directory as localhost. How should a browser know, which one of these directories is required, when you enter http://localhost?

Re: WIN 10 with XAMPP 7.0.9 - local hosts

PostPosted: 16. October 2016 22:53
by Altrea
Nobbie wrote:It is impossible to access more than one directory as localhost

http://localhost:1234
http://localhost:1235

http://site1.localhost
http://site2.localhost

http://localhost/site1
http://localhost/site2

all of these can be directories requestable from localhost :D
just my three cents

Re: WIN 10 with XAMPP 7.0.9 - local hosts

PostPosted: 16. October 2016 23:08
by dmreed
Isn't there anyone here who is actually running WIN 10 and XAMPP 7.0.9 with multiple local host directories?

Everyone seems to just be quoting various and different suggestions or personal opinions from different sites and forums, etc.

Surely some has actually managed to implement the scenario I first described. I previously had the 2 local host directories working on previous versions of Windows using XAMPP 1.7.3 but the previous code does not work for Windows 10.

Re: WIN 10 with XAMPP 7.0.9 - local hosts

PostPosted: 17. October 2016 00:18
by Altrea
How to create virtual hosts in Apache 2.4 is a common task. I cannot believe you can't find anything at the internet...

Re: WIN 10 with XAMPP 7.0.9 - local hosts

PostPosted: 17. October 2016 01:28
by dmreed
there are a lot of proposed solutions, none of them describe my problem or they simply have not worked for me. that is why I am asking if someone who is/has actually used Win 10 and XAMPP 7.0.9 with multiple local hosts in at least 2 separate directories.

Re: WIN 10 with XAMPP 7.0.9 - local hosts

PostPosted: 17. October 2016 06:54
by Altrea
Than maybe you didn't describe your problem very well.

You only said you want to serve two different directories from your local host. This is the very first example from this official Apache manual:
https://httpd.apache.org/docs/2.4/vhosts/examples.html

Re: WIN 10 with XAMPP 7.0.9 - local hosts

PostPosted: 17. October 2016 12:37
by Nobbie
Altrea wrote:all of these can be directories requestable from localhost :D
just my three cents


This simply proofs, that you got it wrong....

Altrea wrote:Than maybe you didn't describe your problem very well.

You only said you want to serve two different directories from your local host.


No, exactly that is your misunderstanding (you did not read carefully). He did not say, he wants to serve different directorys from localhost, instead he wants to access these as localhost. You see the small, but anyway big difference?! To serve "from" is not the same as to serve "as". Its obvious, that he is looking for two DocumentRoots for one host.