Setting up local domain outside www folder and is working on LAN
Posted by: markandrewkato (---.203.85.39.pldt.net)
Date: August 18, 2012 01:01PM

Hi,

Does anybody know how to setup a virtual host that will work outside the www folder and is accessible by LAN?

I can setup the virtual hosts and managed to create custom domain name locally. Eg. test.localhost or myname.test.com.

But for LAN, I can only access it by IP address.

When the virtual host is enabled, I can't access the website through LAN. I really want this two to work together.

Any ideas?


Thanks,
Mark

Options: ReplyQuote
Re: Setting up local domain outside www folder and is working on LAN
Posted by: stevenmartin99 (Moderator)
Date: August 18, 2012 03:12PM

No you can't

You need a DNS Server or else you need to modify the hosts files on each pc on the network

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Setting up local domain outside www folder and is working on LAN
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: August 18, 2012 03:31PM

Steve is of course right, but you can get round it by editing the HOSTS file on each of your networked PC's

You need to know the IP of the PC running the WAMP server and that will need to be a static address. Then do this in the HOST files of each PC you want to see your domainnames

192.168.0.10 test.localhost
192.168.0.10 myname.test.com

The hosts file is what was used by OS's before DNS servers were invented. It is always the first place the network stack checks when doing domainname to ipaddress conversions. For that reason be careful what you put in there as it will be used in preference to a live DNS.

Of course this is only practical if you are talking about a few PC's

Options: ReplyQuote
Re: Setting up local domain outside www folder and is working on LAN
Posted by: stevenmartin99 (Moderator)
Date: August 18, 2012 03:52PM

I have an program that will update host files across an entire network if you have a large network( 20pc's + )

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Setting up local domain outside www folder and is working on LAN
Posted by: markandrewkato (---.203.85.39.pldt.net)
Date: August 18, 2012 04:14PM

I see. I think I'll do the changing of the HOSTS file on the PC's.

@steve What is the name of the program that your talking about? Can I use it?

Thanks guys for answering my questions. This really helped me a lot. I've Googled this thing and didn't found what I'm looking for. Then finally made my way through the forums.

Again, thanks guys!

Options: ReplyQuote
Re: Setting up local domain outside www folder and is working on LAN
Posted by: stevenmartin99 (Moderator)
Date: August 18, 2012 04:20PM

i made it, im not at pc right now, but ill post a link when i get back to my pc. it uses nircmd and putty to connect as an admin to rewrite the files, but honestly its trouble to set up.

i only use it because in some situations i need to rewrite host files daily , so its worth the initial setup time.


if you only need to set up one domain, just copy the file onto each pc.

you can always use the PC NAME to conenct to it with out using the IP.


so if you renamed the pc running wamp to the word you wanted... then other pcs on the network could use

[PCNAME] to access it ...

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Setting up local domain outside www folder and is working on LAN
Posted by: markandrewkato (---.203.60.101.pldt.net)
Date: August 22, 2012 08:58AM

I see. Really helped me a lot. Anyway, at least I now I know that I can connect my LAN through vhosts. smiling smiley Thanks again guys!

Options: ReplyQuote


Sorry, only registered users may post in this forum.