-
October 23rd, 2005, 02:45 PM
#1
An Apache webserver problem
Dear all,
I am experimenting with setting up a small home network. As a first step I connected two computers [named "machine1" and "machine2", both running XP Professional] together [ a single cable from network card to network card]. machine1 is connected to the internet through an USB DSL modem. I am able to access the internet from machine2. So far so good.
Now, the problem. I have an Apache web server intalled in machine1. When I enter url http://machine1 from machine1, I get the local web server OK, but when I type in http://machine1 from machine2 the request goes out to the internet and I get some machinery dealer's website [ www.machine1.com]. How can I access machine1's web server from machine2 ?
Any advice you can offer is welcome , even if it's a wild guess .
Thanks and regards
Sahir
-
October 23rd, 2005, 05:13 PM
#2
Re: An Apache webserver problem
What if you use ip address instead of machine name. Another solution might be to add an entry in machine2's C:\WINDOWS\system32\drivers\etc\hosts file specifying the ip address of machine1.
- petter
-
October 24th, 2005, 06:03 AM
#3
Re: An Apache webserver problem
I used the IP address shown on the "Local Area Connection Status" dialog. It did not work. Then, I tried the IP address of the PPP adapter, it didn't work either.
Last edited by Sahir; October 24th, 2005 at 06:08 AM.
-
October 25th, 2005, 10:26 PM
#4
Re: An Apache webserver problem
I tried all sorts of things. Nothing seems to work. Any ideas any one ?
-
November 2nd, 2005, 12:19 AM
#5
Re: An Apache webserver problem
Originally Posted by wildfrog
What if you use ip address instead of machine name. Another solution might be to add an entry in machine2's C:\WINDOWS\system32\drivers\etc\hosts file specifying the ip address of machine1.
- petter
That only creates an alias for the ip address. It does not solve the problem. This problem is still unsolved. Any ideas anyone ?
-
November 9th, 2005, 06:33 PM
#6
Re: An Apache webserver problem
Originally Posted by Sahir
I tried all sorts of things. Nothing seems to work. Any ideas any one ?
In Explorer have you tried setting the 'Bypass proxy server for local addresses' option ..
Gremmy
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
November 9th, 2005, 07:57 PM
#7
Re: An Apache webserver problem
What IP addresses are you using on your network cards ?.
Preforably you should be using addresses reserved for local area networks ie. in the range 192.168.x.x
The biggest problem encountered while trying to design a system that was completely foolproof,
was, that people tended to underestimate the ingenuity of complete fools.
Douglas Adams
-
November 10th, 2005, 12:39 AM
#8
Re: An Apache webserver problem
Originally Posted by GremlinSA
In Explorer have you tried setting the 'Bypass proxy server for local addresses' option ..
Yes.
Originally Posted by khp
What IP addresses are you using on your network cards ?.
Preforably you should be using addresses reserved for local area networks ie. in the range 192.168.x.x
They are 192.168.0.1 and 192.168.0.197
-
November 10th, 2005, 10:23 PM
#9
Re: An Apache webserver problem
Originally Posted by Sahir
Yes.
They are 192.168.0.1 and 192.168.0.197
I would suspect the problem is that on computer1 you are tunneling all requests from computer2 directly onto the internet connection. But I'am not really too familliar with Windows network connection sharing. Does any other network services work between the 2 systems work ?, ie if you share a folder on computer1, can you see it on computer 2 ?
Could you perhaps try running the command "route PRINT" from a command prompt on both systems and show us the result ?
But might I suggest that you get a proper hardware router, they can be had pretty cheap with inbuild 4 port switch, wifi and everything you could possibly want for a home network.
Last edited by khp; November 10th, 2005 at 10:33 PM.
The biggest problem encountered while trying to design a system that was completely foolproof,
was, that people tended to underestimate the ingenuity of complete fools.
Douglas Adams
-
November 11th, 2005, 08:08 AM
#10
Re: An Apache webserver problem
Originally Posted by khp
I would suspect the problem is that on computer1 you are tunneling all requests from computer2 directly onto the internet connection.
Yes that is right. I understood that from the beginning, but I don't know what windows settings to change.
Originally Posted by khp
Does any other network services work between the 2 systems work ?, ie if you share a folder on computer1, can you see it on computer 2 ?
Yes. I am able to see shared folders.
Originally Posted by khp
But might I suggest that you get a proper hardware router, they can be had pretty cheap with inbuild 4 port switch, wifi and everything you could possibly want for a home network.
Yes, I am thinking of doing that, but I prefer to do that when a third machine is added i.e. when I buy a laptop (current one's been dead since some months). Since I don't do any serious work at home this is more of an academic interest issue than any actual need. So even if I evade the problem by buying a router it would still haunt my sleep and waking hours
An interesting development has taken place recently. I uninstalled Apache from machine1 and moved it to machine2 and then I installed IIS in machine1. Now when I try 192.168.0.1 from machine 2 it does not go out to the internet. It tries to connect and fails. I think it's being routed right now, but some firewall setting (either the XP firewall or Norton intenet security) is stopping it from going through. I scent victory
-
November 15th, 2005, 12:28 AM
#11
Re: An Apache webserver problem
to access a webserver by name, a request must go through a name server. If an entry exists locally for machine1, or even semi-locally (as in the same subnet) then http://machine1 will resolve to the ip it needs, otherwise that request will go outside the network to the dns server listed in your network connection, and will attempt to resolve http://machine1. the reason it works locally is because the computer name is an alias.
here's a tutorial on setting up a local dns server (its for win2003 but since you dont have 2003 its not going to do you much good). My recomdendation would be to download and use Bind if you must use machine1 and machine2 to point to these machines.
also putting them on the same subnet or workgroup should work too.
-
November 15th, 2005, 04:59 AM
#12
Re: An Apache webserver problem
Originally Posted by MadHatter
to access a webserver by name, a request must go through a name server. If an entry exists locally for machine1, or even semi-locally (as in the same subnet) then http://machine1 will resolve to the ip it needs, otherwise that request will go outside the network to the dns server
The reason why http://machine1 does not work was known to us long ago, what we are trying to find out is why http://192.168.0.1 does not work.
-
November 15th, 2005, 09:02 AM
#13
Re: An Apache webserver problem
your config needs to specify accepting connections from all IP Addresses (if you bind to localhost, sending a request to the internal ip address will fail, so unless you list all the IP's it will accept connections from it will also fail. binding to 0.0.0.0 usually does the trick).
sorry, I saw the link in your sig and posted.
Last edited by MadHatter; November 15th, 2005 at 09:05 AM.
-
November 15th, 2005, 12:15 PM
#14
Re: An Apache webserver problem
Originally Posted by MadHatter
your config needs to specify accepting connections from all IP Addresses (if you bind to localhost, sending a request to the internal ip address will fail, so unless you list all the IP's it will accept connections from it will also fail. binding to 0.0.0.0 usually does the trick).
How do I do that?
-
November 15th, 2005, 04:48 PM
#15
Re: An Apache webserver problem
in your httpd.conf file there is a "Listen" item, where you can specify the endpoint for it to listen to (usually just has port location but can also have the IP address), you can also specify the ip.
for apache 1.3x: http://httpd.apache.org/docs/1.3/bind.html
for apache 2.x: http://httpd.apache.org/docs/2.0/bind.html
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|