vitualhost and name based site problem

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

Re: vitualhost and name based site problem

Postby ravpxl » 31. July 2012 17:07

Thanks for the followup.

I was going to look at the security issue next, I just wanted to see if I could get this to work on the network, so I followed the set up specified by sharley above.
To clarify things for myself, and possibly anyone else that may come across this, it's best not to have to have mydomainfolder set up in the htdocs folder, but somewhere outside of that,
something like c:/projects/mydomainfolder?

As far as the host file, I do only have the 192.168.nn.nnn mydomainfolder.local line in the host file where I have the xampp install.
So, basically what your saying, is that if I want multiple people on the internal network to access the site I create via vanity url like http://mydomainfolder.local, i'll have to update every pc's host file and add
that one line of code, otherwise they will have to use the ip address?

I kind of get it, but it defeats the purpose of facilitating access to other users, if I have to update all their host files.

if this is the case, do you know of any other options I might have, or an alternate set up?

I appreciate the feedback, or any links/blog post you might know of.

Thanks again
ravpxl
 
Posts: 5
Joined: 26. July 2012 17:02
XAMPP Version: 5.6.3
Operating System: windows

Re: vitualhost and name based site problem

Postby Altrea » 31. July 2012 19:30

Hi ravpxl,

ravpxl wrote:To clarify things for myself, and possibly anyone else that may come across this, it's best not to have to have mydomainfolder set up in the htdocs folder, but somewhere outside of that,
something like c:/projects/mydomainfolder?

Not exactly. The best way to organize things for me is to have one unique directory per application and one (sub-)domain for each application which is routed directly in this specific application folder.
My servers are organized something like this, but it is fully up to you:
Code: Select all
- /htcocs
--- /domain1.com
----- some folders/files outside documentroot
----- /public_html <--DocumentRoot
------- /css
------- /js
------- other asset folders
------- /.htaccess
------- /index.php
--- /domain2.com
----- some folders/files outside documentroot
----- /public_html <--DocumentRoot
------- /css
------- /js
------- other asset folders
------- /.htaccess
------- /index.php

you can have it inside your htdocs or outside. It doesn't matter.
It depends all on your DocumentRoot setting

ravpxl wrote:So, basically what your saying, is that if I want multiple people on the internal network to access the site I create via vanity url like http://mydomainfolder.local, i'll have to update every pc's host file and add
that one line of code, otherwise they will have to use the ip address?

correct.

ravpxl wrote:if this is the case, do you know of any other options I might have, or an alternate set up?

You could use a DNS Server in your network for url name translation. But this DNS Server needs to be known by any client too.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6764
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 74 guests