Personal Web Hosting Not Working

ppc_michael

Guest
Original poster
Apr 26, 2005
1,498
2
Los Angeles, CA
In 10.3 I was able to host my website directly off my iBook with Apache. I had absolutely no problems.

Now in 10.4 I don't seem to be able to. I'm able to access my website within my LAN, and as a result I had no idea it wasn't working on the "outside" until a few weeks later. I have Hosting enabled in the Sharing panel of course, and ports 80, 427, and 443 are properly forwarded to my iBook via my router.

"Outside" traffic just doesn't seem to be reaching my iBook at all, because error.log doesn't report anything. I thought maybe permissions weren't set correctly, but as I said error.log hasn't said anything about that.

If it helps at all, the error I get from services that try to access my website, like the w3c validators, return a 500 error, saying "No route to host."

The address to my site is http://24.236.140.39/ if you'd like to try it out yourself. I do have a domain name associated with that, but obviously if I get the provided address working, the domain will work as well.

Mods: If this belongs in another category, please do move it. I wasn't sure where this should go. ;)

Thanks for any help! :)
 

jsw

Moderator emeritus
Mar 16, 2004
22,819
41
Andover, MA
No help really, but I can ping that address, so, in theory, you're reachable to some extent.
 

mduser63

macrumors 68040
Nov 9, 2004
3,038
30
Salt Lake City, UT
jsw said:
No help really, but I can ping that address, so, in theory, you're reachable to some extent.
I think that just means that the router is alive and on the internet. Have you checked to make sure your iBook's firewall is open on the necessary ports?
 

jsw

Moderator emeritus
Mar 16, 2004
22,819
41
Andover, MA
Just to be sure: you're certain the IP address you've forwarded those ports to on your router is definitely the one your Mac is using at this moment? Probably a dumb question, but I spent a day sure that iChat was broken before discovering that I needed to reboot my router for it to actually set the ports I'd used.
 

Blackheart

macrumors 6502a
Mar 13, 2004
938
0
Seattle
Are you sure your ISP has those ports open to you? An ISP may close them to disallow you to serve unless you pay them a fee.
 

ppc_michael

Guest
Original poster
Apr 26, 2005
1,498
2
Los Angeles, CA
Ick. I never thought of that.

Well I know it was working fine right up until I upgraded to 10.4, and then it didn't work immediately after that according to my server logs, so I don't think that would be it. At least I hope not. ;)
 

skp574

macrumors 6502
Jan 16, 2005
280
0
greenwich.london.uk
One thing to make sure, as you've not explicitly said so, is the LAN IP address of your iBook. Is it static or dynamic? I'd seriously recommend setting it to static. Otherwise if the DHCP server in your router decides to dish out a new IP to your iBook, the IP ports you have forwarded (in the router) will not work. They could affectively point to nowhere or another computer, if you have one.

I had all sorts of problems with an IP camera that I wanted to access from outside my LAN. The problem was solved once I'd set the camera with a static ip, and opened up the appropriate ports on the router to that static ip.

I too have tried to access the ip you gave and don't get a reply.
 

ppc_michael

Guest
Original poster
Apr 26, 2005
1,498
2
Los Angeles, CA
I do have DHCP enabled, however I have an Airport Extreme so it always seems to assign 10.0.1.3 to my iBook. That is the case right now, too, and port 80 is definitely set to forward to 10.0.1.3.
 

skp574

macrumors 6502
Jan 16, 2005
280
0
greenwich.london.uk
I have just setup personal web sharing and it works for me.


See if you can access my apache web server on http://80.229.238.84:80/~Scott/.

It's an iMac running 10.4.1. All I did was map port 80 on my router to an internal LAN address, which is set to static on my iMac. You should be able to see the standard Apache welcome page.

I checked it by connecting to my company VPN and opening up a web browser on a remote machine to the ip address above and it displayed the page.

You could try temporarily disabling the built in fireware under OS X to see if helps. But as I say mine works fine.



Edit: If I try to access the web server with the above address from inside my LAN it won't work I get a page not found message from my Netgear router. That is why I did an RDC from my office PC just to double check it worked ok.

Edit2: I also found that if the trailing '/' is omitted from the full website address above I also get a page not found error.
 

yellow

Moderator emeritus
Oct 21, 2003
15,925
1
Portland, OR
Seems to me that it's likely your router and it's filtering web service. Make sure the firewall on the router is properly forwarding the info. If not your router, well SOMETHING is filtering web traffic.

Code:
yellow% sudo nmap -sS -v -p80 24.236.140.39

Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-06-04 23:31 EDT
Initiating SYN Stealth Scan against 24-236-140-39.dhcp.bycy.mi.charter.com (24.236.140.39) [1 port] at 23:31
The SYN Stealth Scan took 0.73s to scan 1 total ports.
Host 24-236-140-39.dhcp.bycy.mi.charter.com (24.236.140.39) appears to be up ... good.
Interesting ports on 24-236-140-39.dhcp.bycy.mi.charter.com (24.236.140.39):
[color=red]PORT   STATE    SERVICE
80/tcp filtered http
MAC Address: 00:09:5B:99:F6:98 (Netgear)[/color]

Nmap run completed -- 1 IP address (1 host up) scanned in 3.726 seconds