5 Replies Latest reply: Oct 29, 2012 4:26 PM by mkm29
mkm29 Level 1 Level 1 (0 points)

I have my desktop (Mac Pro) set up as my personal web server to host one of my websites (mitchsprogress.org) using DynDNS to handle my dynamic IP address, it works fine except I get this error when I try to access my site locally, but I had my friends test it and it loads properly for them, does anyone know how to fix this or how I can diagnose it? Screen Shot 2012-10-29 at 11.11.12 AM.png

 

Also just FYI I am using Mountain Lion and Server.app


Mac OS X (10.6.8)
  • 1. Re: 404 error for personal site
    mkm29 Level 1 Level 1 (0 points)

    Also, going to the static IP I assigned to my desktop does nothing it just stays on "Sending request..."

  • 2. Re: 404 error for personal site
    MrHoffman Level 6 Level 6 (12,455 points)

    404 means you got to a web server somewhere, but (if it's your web server) probably not to the virtual host (what Apple calls a "site") that you had intended.  I'll assume you're entering the same string in the browser, whether local or remote.

     

    First, launch Terminal.app and issue the non-destructive diagnostic command

     

    sudo changeip -checkhostname

     

    This command will (usually) indicate whether the network is configured correctly or if there are changes required.

     

    Then issue the following Terminal.app command and see what you get as a response

     

    dig mitchsprogress.org

    dig @8.8.8.8 mitchsprogress.org

     

    You'll probably get your public IP address with both commands.  If you see different addresses returned from these two commands, please indicate that.

     

    Now check the Apache web server logs, and see what the incoming connections are, and what sorts of errors are arising.  If any.

  • 3. Re: 404 error for personal site
    mkm29 Level 1 Level 1 (0 points)

    Ok everything looks right with the hostname command, however the 2 dig commands give me a different IP, the first gives me the IP I assigned my desktop (192.168.1.138) and the second gives me my public IP (72.184.242.198). Also I dont know if this matters but the first command returns a NS (nameserver) record and the second does not

  • 4. Re: 404 error for personal site
    MrHoffman Level 6 Level 6 (12,455 points)

    So the host name indicated "no changes are required"?  Good.

     

    Are you using the same domain inside your network as you're using outside?

     

    Yes; this IP addressing and DNS stuff matters.  OS X Server requires correct DNS services, and the web view (virtual host, site, etc) that the web server presents to the client is (somewhat confusingly) based on the DNS services name that the client web browser uses. 

     

    If you're getting back an NS nameserver record and not an A machine record from the dig commands, then local DNS isn't right.  For some background, here is how to set up DNS on OS X Server and here is how Apache virtual hosts work

  • 5. Re: 404 error for personal site
    mkm29 Level 1 Level 1 (0 points)

    No the issue is I get that 404 error whenever I try to access the site locally (on the same network) but when I use a different network (my phone or my sisters network) the site loads fine, the dig commands do return 2 A records but only one returns an NS record the other doesnt