Why won't Mac open sites hosted on it?!

mickey79

True Defiance
Ave,

I run the Apache Web Server on my PowerMac G5 with Panther (10.3.9). I host a few websites on this web server and i have used ZoneEdit for DNS & IP stuff.

The problem is, i cannot access my website using the domain name. I can only access them using localhost. Any computer besides my own Mac computer can access them like a normal website with thier domain name, so why does my Mac refuse to open sites hosted on itself using the domain name? I don't get it!!

Any suggestion?

Thanks,
Mickey
 
Most likely because the domain name does not resolve to you computer's local IP. I would be willing to bet dollars to doughnuts that you have a DSL modem, a router, or other NAT type box translating the addresses for the boxes that can see your server.
 
lurk said:
Most likely because the domain name does not resolve to you computer's local IP. I would be willing to bet dollars to doughnuts that you have a DSL modem, a router, or other NAT type box translating the addresses for the boxes that can see your server.

Ave,

Here's what we have.
A time warner cable internet connection. The internet comes to the cable modem, then it goes to the Symantec Security Router... from there the internet goes to all the computers. We have about 10 Windows Computers, and 1 Mac. The Mac hosts the websites. All the Windows Computers are able to open the websites with the domain name, only the Mac, which actually hosts the sites, is not able to open the domain name.

Mickey
 
mickey79 said:
Ave,

Here's what we have.
A time warner cable internet connection. The internet comes to the cable modem, then it goes to the Symantec Security Router... from there the internet goes to all the computers. We have about 10 Windows Computers, and 1 Mac. The Mac hosts the websites. All the Windows Computers are able to open the websites with the domain name, only the Mac, which actually hosts the sites, is not able to open the domain name.

Mickey

I don't know DNS on Windows, but it sounds like the peecees resolve the domain name to the Mac's local IP (weird behaviour), while the Mac does not.

Like lurk suggests, you'll have to log in on your modem/router and open at least port 80 to the local IP of your Mac to make it accessible from the internet.
 
ksv said:
I don't know DNS on Windows, but it sounds like the peecees resolve the domain name to the Mac's local IP (weird behaviour), while the Mac does not.

Like lurk suggests, you'll have to log in on your modem/router and open at least port 80 to the local IP of your Mac to make it accessible from the internet.

Ave,

You said, i have to "open at least port 80 to the local IP of my Mac in my Router".... But that's my point... i don't have anything blocked/closed in my router!! How do i open the port 80 when it's not closed? In my router's admin, i have setup "No Restrictions" for my Mac. Absolutely no filters or roadblocks so that the Mac can have uninterrupted data flow.

Mickey
 
I have a webserver running on a windows PC with windows 2000 server (was 2003 server). It will never be able to see the websites at www.yourdomain.com, rather than through localhost.... because your DNS is set up to point to that same IP and it causes a conflict. You will only ever be able to view and edit websites from outside of that network at www.yourdomain.com. That is why when you log in to the router you have a network address and a "public" ip address.
 
geekgrrrl said:
I have a webserver running on a windows PC with windows 2000 server (was 2003 server). It will never be able to see the websites at www.yourdomain.com, rather than through localhost.... because your DNS is set up to point to that same IP and it causes a conflict. You will only ever be able to view and edit websites from outside of that network at www.yourdomain.com. That is why when you log in to the router you have a network address and a "public" ip address.

Ave,

So what you're saying is, as my websites are hosted on my Mac, i will never be able to open them with thier www.domainname.com, and only be able to view them on localhost, on the Mac ?

I do understand the conflict with the DNS, and it's almost like the worst fear coming true... i just find it very hard to believe that you can't access the sites with thier domain name on the machine that hosts them.

Mickey
 
lurk said:
Try this. Do to the terminal and type

dig www.example.com

and see what ip address it looks up.

Now try to access your web site from the PCs and the Mac using that IP. So something like http://123.45.67.89/homepage.html and let us know what works and what doesn't.

Ave,


Code:
DIG www.troyjobs.com

; <<>> DiG 9.2.2 <<>> www.troyjobs.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30573
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.troyjobs.com.              IN      A

;; ANSWER SECTION:
www.troyjobs.com.       1226    IN      A       24.97.146.27

;; Query time: 10 msec
;; SERVER: 172.16.0.12#53(172.16.0.12)
;; WHEN: Fri Aug 26 08:53:29 2005
;; MSG SIZE  rcvd: 50

The IP Address 'dig' gave me is 24.97.146.27, which is my outside IP address that the world outside the office uses to access sites hosted on my MAC. If i 'ping troyjobs.com', i'll get this same IP.

I am not able to access my websites on the MAC using this IP either. So basically, http://24.97.146.27/index.html doesn't open anything on my MAC, it opens the website from any other computer but my Mac.

Mickey
 
geekgrrrl said:
I have a webserver running on a windows PC with windows 2000 server (was 2003 server). It will never be able to see the websites at www.yourdomain.com, rather than through localhost.... because your DNS is set up to point to that same IP and it causes a conflict. You will only ever be able to view and edit websites from outside of that network at www.yourdomain.com. That is why when you log in to the router you have a network address and a "public" ip address.

Sorry, but that's just wrong.

mickey79 said:
Ave,

You said, i have to "open at least port 80 to the local IP of my Mac in my Router".... But that's my point... i don't have anything blocked/closed in my router!! How do i open the port 80 when it's not closed? In my router's admin, i have setup "No Restrictions" for my Mac. Absolutely no filters or roadblocks so that the Mac can have uninterrupted data flow.

Mickey

You have to specifically tell the router to forward requests on port 80 to your Mac, because the router has no idea that you ever set up a web server or on which of your computers.

There is usually a section in the router setup for "NAT port forwarding" or something like that. Configure it to forward requests on port 80 to the internal/local IP of your Mac.
For that purpose, you'll also want to configure the Mac to use a static internal IP, i.e. it should not change when you reboot it or your router decides for some reason that your Mac should get a new IP. There should be a section in the router's manual on how to do that; it depends on the router.
 
The information you gave me from dig tells me that in fact you are using a NAT and accessing it form the "wrong" side. That is a bit of a pain in the neck. All is not lost though. The easiest solution is to add your machine's name to the "hosts" file or NetInfo using the internal IP address. That way your machine would resolve the name www.troyjobs.com to something like 10.0.0.42 and everything will be peachy.

Now I don't know NetInfo so someone else will have to pipe up with the answer to how to do that but that really is the right thing to do to fix your problem.

Hope that helps.
 
ksv said:
Sorry, but that's just wrong.



You have to specifically tell the router to forward requests on port 80 to your Mac, because the router has no idea that you ever set up a web server or on which of your computers.

There is usually a section in the router setup for "NAT port forwarding" or something like that. Configure it to forward requests on port 80 to the internal/local IP of your Mac.
For that purpose, you'll also want to configure the Mac to use a static internal IP, i.e. it should not change when you reboot it or your router decides for some reason that your Mac should get a new IP. There should be a section in the router's manual on how to do that; it depends on the router.

Ave,

Sounds logical. I'm going to try and get this done and get back in touch with you to tell you what happened. I'm not sure where i can setup the NAT port forwarding in my router settings, but i'm gonna try and find out.

Thanks,
Mickey
 
ksv said:
Sorry, but that's just wrong.
You have to specifically tell the router to forward requests on port 80 to your Mac, because the router has no idea that you ever set up a web server or on which of your computers.

There is usually a section in the router setup for "NAT port forwarding" or something like that. Configure it to forward requests on port 80 to the internal/local IP of your Mac.

It is my impression that the site works fine for external machines and not for the host itself. That means that the NAT is set up just fine and working as it should. What would make you suspect the NAT in this case? Now if I missed that the site was unreachable from outside the NAT/router then that is a different kettle of fish.
 
Back
Top