Jump to content

Web server not seen from LAN


Recommended Posts

Hi. I'm trying to build a home server using Microsoft Windows Server 2008 R2, Apache 2.2, PHP 5.2, MySQL 5.5. The server works fine localy. The problem is accessing it externaly (from LAN / Internet). I can't get my other computer (both connected through a router) to "see" the server. The problem isn't with the router (I had to reinstall the Windows to solve some problems ...the first time I was using IIS and I could see the site from LAN/Internet and I didn't change any settings in the router) or the firewall (I have disabled both PC's firewalls for testing purposes). So I'm guessing it might be an Apache setting problem, but I can't figure out what (I created a virtual server for the site using localhost as the domain name as I have read that this might be a cause, but no luck). Any idea what the problem might be and how to solve it? Thank you in advance. Bye.

PS: I don't know if this helps, but I can't even ping one PC from the other.

Link to comment
Share on other sites

1) localhost is pretty much a reserved name meaning "myself". If you have the Web server running on Machine1 and you try to access http://localhost on Machine2, Machine2 will be trying to find the webserver on itself. You should (probably) change the virtual server name.

 

2) If you created an Apache virtual server name on Machine1, you need to tell Machine2 how to find that name. Basically, you need a DNS entry somewhere telling Machine2 that VirtualWeb1 (or whatever) is located at IP address 192.129.92.29 (or whatever). I have always added these entries into the "hosts" file on Machine2 (in this case). --  Of course, if your router is handling DHCP for your LAN, it is giving out dynamic IP addresses, and the IP address of Machine1 could change.

 

I'm no expert at networking, and I suspect I have always done it the hard way. But it works, and I don't know how else to do it. You might be able to place the DNS entry in your router telling it that requests for VirtualWeb1 (or whatever) should go to Machine1 or to the IP address of Machine1.

 

3) To access it from OUTSIDE your router (i.e. over the internet), you will have to tell the router to forward port 80 to the proper machine. I am not sure how to make this approach work with virtual server names. I've never really tried.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.