Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Can't access Apache webserver from other computers

Can't access Apache webserver from other computers
Thread Tools
Junior Member
Join Date: Dec 2003
Location: New Jersey
Status: Offline
Reply With Quote
Mar 16, 2004, 02:30 PM
 
I'm trying to access the web server that we get with OS X. I can access it through the machine I have the html files on, but I can't access it from any other computer. I'm going through a cable modem. I dont think my problem is because of a dynamic IP -- I have dnsdyn.org set up for my url. Though, oddly, my url hasn't changed for 2 weeks now (I'm not sure if it's supposed to).

I have Personal Web Sharing on under the Sharing panel in System Preferences. The Network Address in this screen is ool-4350956a.dyn.optonline.net . So the url I use to access my stuff is http://ool-4350956a.dyn.optonline.net .

I have my html files in /Library/WebServer/Documents/ .

Can anyone offer suggestions for trouble-shooting this?

I;ve tried putting everything in my home account and accessing it through
http://ool-4350956a.dyn.optonline.net/~[username]/, but I have the same problem there.

Thanks in advance.
MacBook 2.4 GHz
Mac OS X 10.5.8
     
Mac Elite
Join Date: Nov 2003
Location: Minnesota
Status: Offline
Reply With Quote
Mar 16, 2004, 02:33 PM
 
Well, I can ping you just fine.

So, here are a couple ?s,

1) When you connect locally, do you use localhost or http://ool-4350956a.dyn.optonline.net?
2) If you use localhost, does http://ool-4350956a.dyn.optonline.net work?
3) Do you have a firewall/router that I would have to go through before I could connect to your machine?
     
Junior Member
Join Date: Dec 2003
Location: New Jersey
Status: Offline
Reply With Quote
Mar 16, 2004, 04:20 PM
 
Originally posted by Turias:
Well, I can ping you just fine.

So, here are a couple ?s,

1) When you connect locally, do you use localhost or http://ool-4350956a.dyn.optonline.net?
2) If you use localhost, does http://ool-4350956a.dyn.optonline.net work?
3) Do you have a firewall/router that I would have to go through before I could connect to your machine?
1) When I connect locally, I use http://ool-4350956a.dyn.optonline.net/ (and this works).
2) I'm not sure how to use localhost. I tried localhost:ool-4350956a.dyn.optonline.net/, but safari says it doesn't recognize urls starting with "localhost:"
3) I am going through a cable modem, which I imagine has a firewall of some sort on it? The default firewall in System Preferences is also on.
MacBook 2.4 GHz
Mac OS X 10.5.8
     
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Mar 16, 2004, 07:16 PM
 
I wouldn't be surprised if your cable modem blocks port 80 in an attempt to keep people from hosting sites thru the cable broadband. You can change which port you use via httpd.conf if you're interested.
Travis Sanderson
     
Senior User
Join Date: Mar 2002
Location: Chicago, IL
Status: Offline
Reply With Quote
Mar 17, 2004, 12:45 AM
 
Yeah, sounds like a firewall problem to me. Hopefully your modem has settings where you can configure it, if so, either forward port 80, or turn DMZ host on. If not, you can try changing the port Apache uses.
We need less Democrats and Republicans, and more people that think for themselves.

infinite expanse
     
Junior Member
Join Date: Dec 2003
Location: New Jersey
Status: Offline
Reply With Quote
Mar 17, 2004, 09:49 AM
 
Originally posted by york28:
Yeah, sounds like a firewall problem to me. Hopefully your modem has settings where you can configure it, if so, either forward port 80, or turn DMZ host on. If not, you can try changing the port Apache uses.

Ok, I changed Port 80 in httpd.conf to 81 and 1051 (and called the webpage using my IP:port) and that didn't work.

I poked around to see where I could change the modem settings and I noticed that in the Network panel of my System Prefs. there is a fixed IP address set (67.80.149.106 -- provided by the DHCP Server), a Subnet Mask set at 255.255.252.0 and then a Router setting: 67.80.148.1. Does a different IP Address and Router IP indicate some sort of firewall? Is there a way to adjust these to get a external access to my webserver?
(Last edited by apostacy; Mar 17, 2004 at 09:57 AM. )
MacBook 2.4 GHz
Mac OS X 10.5.8
     
Mac Elite
Join Date: Aug 2000
Location: Minneapolis, MN
Status: Offline
Reply With Quote
Mar 17, 2004, 10:50 AM
 
It sounds like you are fairly savvy and can figure this out. And it really looks from your example addresses as if you are not using a router.

When you make a setting change to the apache configuration, you need to restart the server for the change to take effect. The easiest way to do that is to stop and then start it again in the system preferences.

Connecting locally means, you may actually be browsing the files rather than using the apache webserver. There are a few ways to access the files locally depending on your particular settings.

http://127.0.0.1/~username/
http://localhost/~username/
file:///Library/WebServer/Documents/index.html

Outside access would be done from your dynamic addressing name, like this:
http://ool-4350956a.dyn.optonline.net/

But it sounds like they actually may be blocking port 80 as a previous poster suggested.
When you change your port number to 81, then you'd want to access the site by specifying you want to look at that port. It would be something like the following.

http://ool-4350956a.dyn.optonline.net:81/

Good luck.
---------------------
For reference, this would apply to users who have a router connected to share their connections.

If you connected directly from your cable modem to your computer, or do you have a router in between your computer and the cable modem?

If you have a router that allows you to have multiple computers set up in your home sharing the internet connection, then your local computer is not directly accessible from the outside. If this is the case, you need to configure your router via a web interface (or follow the directions in its manual) to allow NAT addressing and passing specific port requests on to the webhosting computer's internal address.

Your cable modem gives you the internet connection (the line into your home). The next device that is connected to this box should be requesting the DHCP information to give the device(a computer or router) an IP address. If this device is a router, then anything connected to the router's internal ports (versus the WAN port) will get an address from the router. The router is an intelligent device similar to a telephone operator. If you don't prescribe to pass calls from the outside (on the WAN) to an internal computer then you'll never get the requesting call for a webpage.
     
Junior Member
Join Date: Dec 2003
Location: New Jersey
Status: Offline
Reply With Quote
Mar 18, 2004, 02:51 PM
 
Originally posted by apostacy:
I'm trying to access the web server that we get with OS X. I can access it through the machine I have the html files on, but I can't access it from any other computer. I'm going through a cable modem. I dont think my problem is because of a dynamic IP -- I have dnsdyn.org set up for my url. Though, oddly, my url hasn't changed for 2 weeks now (I'm not sure if it's supposed to).

I have Personal Web Sharing on under the Sharing panel in System Preferences. The Network Address in this screen is ool-4350956a.dyn.optonline.net . So the url I use to access my stuff is http://ool-4350956a.dyn.optonline.net .

I have my html files in /Library/WebServer/Documents/ .

Can anyone offer suggestions for trouble-shooting this?

I;ve tried putting everything in my home account and accessing it through
http://ool-4350956a.dyn.optonline.net/~[username]/, but I have the same problem there.

Thanks in advance.
I was hoping the solution would be a little more complicated (and a little less obvious), but here it is: the firewalls *were* the problem. The original ports made accessible from outside network traffic did me no good because there is a block from my cable company on port 80. But I just realized that I could set a new port (1050) as accessible from outside traffic, which does the trick. Thanks everyone for their help!!!
MacBook 2.4 GHz
Mac OS X 10.5.8
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:02 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2