drewjoh Posted September 1, 2008 Share Posted September 1, 2008 Hi All, I'm wanting to create a local Ubuntu or CentOS server on my local network with virtualhosts, so I can use URLs like "testserver1" in my browsers and it accesses the local server box. (For web dev testing) I found I can do this by setting up the virtualhosts in Apache, and then on my other machines (Macs) I have to add that to the hosts file to have it use a specific IP address (local one). What I'm wanting is to just be able to define new hosts in Apache, and it be accessible across the local network without modification to each computer. I was able to do this easily with Windows Server 2000 about 3 years ago. I would just setup the server with a name, and typing that in the address bar in a browser accessed that local server. Can Apache not do something similar? (Yes, I've Googled lots!) Quote Link to comment https://forums.phpfreaks.com/topic/122290-creating-a-server-on-the-local-network/ Share on other sites More sharing options...
trq Posted September 1, 2008 Share Posted September 1, 2008 You would need to setup a local DNS server (bind). This could run on the same machine as Apache if you wished. Then all you need do is have your machines use this DNS server for domain name resolution. Each time you add a new domain to apache, add a new domain to your dns server and restart. I use the exact same setup here quite effectively. Quote Link to comment https://forums.phpfreaks.com/topic/122290-creating-a-server-on-the-local-network/#findComment-631512 Share on other sites More sharing options...
corbin Posted September 2, 2008 Share Posted September 2, 2008 Nevermind.... Sorry... Realized my suggestion made no sense. I feel like a nasty spammer now. Oh to add something useful, what DNS daemon did you use, thorpe? Quote Link to comment https://forums.phpfreaks.com/topic/122290-creating-a-server-on-the-local-network/#findComment-631539 Share on other sites More sharing options...
trq Posted September 2, 2008 Share Posted September 2, 2008 what DNS daemon did you use, thorpe? Bind. Quote Link to comment https://forums.phpfreaks.com/topic/122290-creating-a-server-on-the-local-network/#findComment-631625 Share on other sites More sharing options...
corbin Posted September 2, 2008 Share Posted September 2, 2008 Today is just not my day.... Very slow day mentally.... lol *pretends he realized you said bind in parenthesis earlier and was asking just to make sure* Quote Link to comment https://forums.phpfreaks.com/topic/122290-creating-a-server-on-the-local-network/#findComment-631627 Share on other sites More sharing options...
drewjoh Posted September 2, 2008 Author Share Posted September 2, 2008 Thanks thorpe! So by changing the DNS Servers, would that mean changing them on the router? I currently use OpenDNS configured from my router, so I would have to use the local server as my DNS server rather than OpenDNS? Quote Link to comment https://forums.phpfreaks.com/topic/122290-creating-a-server-on-the-local-network/#findComment-631750 Share on other sites More sharing options...
trq Posted September 2, 2008 Share Posted September 2, 2008 You should still be able to use OpenDNS as your secondary, but a local DNS should suffice. Quote Link to comment https://forums.phpfreaks.com/topic/122290-creating-a-server-on-the-local-network/#findComment-632274 Share on other sites More sharing options...
burn1337 Posted September 4, 2008 Share Posted September 4, 2008 Umm not sure but I think you probibly could set up OpenDNS to run off your hosts file on your server. Quote Link to comment https://forums.phpfreaks.com/topic/122290-creating-a-server-on-the-local-network/#findComment-633617 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.