404 Error ONLY on localhost

I setup my Mac Pro to be my personal web server (running Mountain Lion and the Server app), and I am using DynDNS so my domain name (mitchsprogress.org) points to my desktop. It works fine from every network except when I go to access it locally, it gives me this 404 Error, I have tried various things to fix it but am still unable to resolve it, can someone please help me?


User uploaded file

Mac OS X (10.6.8)

Posted on Nov 5, 2012 6:25 AM

Reply
5 replies

Nov 5, 2012 7:25 AM in response to mkm29

If you have a Router, you local Mac's IP address will be shown in System Preferences > Network.


DynDNS will resolve to your Internet Visible IP Address. That address is not available directly on your local network. (local references go directly to any Address on your subnet, bypassing the Router's Port Forwarding.)


To test your Web Server, use a physical Address when working from your local Network.


A more general solution is to set up a local DNS Server that can resolve both forward and backward lookups to your local host. (This is what you do when setting up Mac OS X Server.)

Nov 5, 2012 10:57 AM in response to mkm29

I am presuming you are using a Router and getting your local IP Address through DHCP (or you have assigned a local IP Address to your Server). Your Router is set to do Port Forwarding to your Server's local IP Address.


To test locally, your local DNS server needs to lookup directly to your local IP Address. You can use Network Utility "Lookup" function to check this, and check both forward (name-> IP) and reverse (IP->name) lookup. Then the DNS strings on you local nodes need to pointy FIRST to your local DNS Server, which then points on to an Internet-based DNS Server such as your ISP's DNS Server to OpenDNS.


My DHCP is set to pass out addresses starting at 192.168.0.101

mydomain.com looks up to 192.168.0.12, the Server Address. (also where the DNS Server lives).

My local DNS Server forward and backward looks up to that address.


My local Workstations all use 192.168.0.12 as their first DNS Address, then forward to Open DNS at 208.67.222.222 and 208.67 220.220


If you are not using DHCP, you need to be using a FireWall of some description. And you need to open the ports in that firewall to allow your web traffic to come in.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

404 Error ONLY on localhost

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.