Forum Moderators: phranque

Message Too Old, No Replies

Apache 2.2 Setup Problem

         

Lendal

7:07 pm on Apr 8, 2010 (gmt 0)

10+ Year Member



I apologize in advance for this being a 'noobish' sounding question. And, yes, I've read and searched for several days and haven't been able to find anything to help me.

The problem is: I've downloaded and installed Apache 2.2 web server on my WinVista64 PC. I want to set up a simple dev site for myself on this PC.

Everything seemed to install fine. No errors or complications, etc. However, no matter what I try, I can't seem to get the server to respond on my WAN IP.

Here's what happens... I can browse to 127.0.0.1 and I get the 'It Works!' page, as I'm supposed to. I can also browse to the PC's internal IP address and get the page just fine. But when I try and browse to my WAN IP, it just times out.

I've checked the WAN IP address many times. I'm using the right address.

I have the Windows firewall turned off. So that's not the problem either.

I've checked and double checked the router firewall and made sure it's set up with port 80 directed to my PC correctly. So I don't think that's the problem either.

Although, the router firewall seemed like such a likely candidate that I set it to DMZ mode just to double check. Sure enough, that had no effect. It still just timed out the same way using the WAN address.

I've been through the conf file many many times and can't find anything wrong in there either. I'm out of ideas and ready to tear my hair out (what's left of it, anyway).

Anyone have any suggestions? Any help would be appreciated.

Thanks.


-ps Forgot to mention, I've check the log files too. There's no error being logged for an access attempt through the WAN IP.

coopster

11:16 am on Apr 9, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, Lendal.

Sounds like Apache is configured to Listen on port 80 and responding to your requests ... internally. I would focus on the router first, watch the router logs to see what is happening. Then watch the incoming ports on the machine to see if the machine is receiving the requests and not blocking them.

Lendal

4:18 pm on Apr 9, 2010 (gmt 0)

10+ Year Member



Thanks, Coopster, for your reply. This thing is driving me crazy and I can use all the help I can get. :)

I've already put the server PC into 'DMZ' mode on the router and that didn't help. So, I had to believe it's not the router that's blocking the port 80 requests.

The PC is getting the port 80 traffic internally, as I can get a response from another LAN connected internal PC's browser using the server PC's internal address, so I have to think nothing on the PC is blocking the traffic either.

So, I naturally assumed that the ISP (AT&T's DSL) might be blocking the port. I think that's a long shot but certainly could be it.

I figured that if they were blocking port 80 I'd just move to another port. So I changed the 'Listen' command in the conf file to port 2080 and reset the router to forward port 2080 to the server PC thinking that would get around it.

Then, I rebooted and tried browsing to the WAN IP (after checking the WAN IP again with www.myipaddress.com) and adding the port :2080 on the end of it in the URL address bar.

Nothing. No response. It just times out with the WAN IP and port 2080, the same as it does on port 80. But it works internally on :2080 just as it did with :80.

*SIGH*

Maybe port 2080 was a poor choice for some reason. I can try a couple of other ports and see what happens there. I'm not holding out much hope at this point though.

But, again, thanks for trying to help. I appreciate it.

coopster

9:30 pm on Apr 9, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have a friend attempt to access the IP (and port) from outside your LAN. See if that works.

Lendal

10:22 pm on Apr 9, 2010 (gmt 0)

10+ Year Member



A good suggestion. Thanks, again, coopster.

I can actually do that myself. I have a smartphone with 3G 'outside' (internal WiFi turned off) access.

Using the browser on that, I connected and got the start up msg. screen!

I tried again in a couple of mins and it failed. Not sure why. And it's still not working internally. Weird...

Oh, and also I did check with my ISP and they are NOT blocking the port I'm using. They do block five or six ports so I made a note of those and won't use any of them in the future.

I'm thinking now that there's a process, application or service running on the server PC that's blocking the http access. It's probably a matter of running that down with the process of elimination now.

It's a pretty busy well-used PC and it's got everything but the kitchen sink running on it. I think maybe I'll drag out one of the old PCs in the closet, dust that off, trim it down to bare bones and install Apache there.

Thanks, again, for your help.

jdMorgan

1:30 pm on Apr 11, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you use your LAN to try to access your WAN address, realize what that means: It means that your router must make an out-going connection to itself, and accept an incoming connection from itself -- both at the same time. That won't work. That's why using your smartphone worked while your LAN machines did not.

As for why it quit, I can't say. That is an oddity. One possibility is that your ISP won't allow port 80 traffic -- a common restriction necessary to keep ADSL-network upload-versus-download-traffic in balance (for more info look up the precise meaning of the "A" in "ADSL").

In fact, some ADSL ISPs will cancel your service if you try to run a server, so do be sure to read their terms of service very carefully in this regard.

If you need to do extensive testing of the WAN connection from within the server's own LAN, then consider using a proxy service out on the Web, and setting that up in your browsers. In this way, your browser connects out to the proxy's IP address, and the proxy will then 'turn the request around' and send it back to your WAN IP.

If all you want to do from inside your WAN is to refer to server by domain name, then you can set up the 'hosts' files on your LAN workstations to resolve your domain name to the LAN address instead of the WAN address. That file is supported on practically all internet-capable machines, and always has the same name - "hosts" -- with no extension.

Jim

jdMorgan

1:32 pm on Apr 11, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, Skype and the IIS server bundled with and enabled by default on certain 'grades' of Windows (e.g. Win XP Pro) can both block port 80 by connecting to it before Apache starts.

Jim

mack

2:02 pm on Apr 11, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



This may not be your problem, but it sounds a lot like a similar issue I had before. When your are within your lan, and you try to access example.com where example.com is hosted on a machine within your lan it becomes unreachable.

This is because the router is expecting requests for the domain to come from the outside. Its a bit like trying to post a letter to yourself, you need to go outside to get to the letterbox :)

First thing you need to figure out is can you access the domain from outside your network. On your smart phone you can try this so long as you aren't using the lan in any way. Use 3G/Edge/HSDPA etc. If you can access the site from outside the lan then this is a good sign. It does however mean your router does not support internal requests for a locally hosted domain.

What you can do, as a workaround is add the domain to your local machines host file. (the machine you are browsing with)

lan.ip.add.ress www.example.com


This means you can access the site using the true url. and the host file will resolve it to the local ip within your lan.

Mack.