chobo Posted September 17, 2007 Share Posted September 17, 2007 Hi, I have Apache 2 setup on one of my computer and it has a whole bunch of virtual sites configured for it. I can connect to those from the machine Apache is installed on with both IP address and server names. I tried using a laptop to connect to one of my sites using an IP address and it served up the first one listed in the virtual host. My question is how can I select which site to load up from the laptop like I do on my apache computer. I tried using the servername (testserver.local, etc...), but it can't connect to them, it only allows my to use my machines IP address and then server the first site. Any help is appreciated, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/69651-how-to-connect-to-apache-using-server-names-from-local-computers/ Share on other sites More sharing options...
trq Posted September 18, 2007 Share Posted September 18, 2007 You need to edit your hosts file unless you want to setup a local dns server. On linux you'll find it within /etc/hosts, windows, I'm not sure. Just search for it. It should be commented with some examples but something like.... # ip of apache server domain name 192.168.10.3 foo.com 192.168.10.3 bar.com should suffice. You need to do this on the client machines. Quote Link to comment https://forums.phpfreaks.com/topic/69651-how-to-connect-to-apache-using-server-names-from-local-computers/#findComment-350270 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.