 |
 |
Can't access Apache webserver from other computers
|
 |
|
 |
|
Junior Member
Join Date: Dec 2003
Location: New Jersey
Status:
Offline
|
|
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
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Dec 2003
Location: New Jersey
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|