Turning My Mac Into A Web Server

Discussion in 'Mac Basics and Help' started by SBT, Sep 24, 2006.

  1. SBT macrumors member

    Joined:
    Apr 5, 2006
    Location:
    England
    #1
    hey, you can see from the title what i am trying to do....

    so far, it has been a sucess...people can access my mac site located at http://172.143.1.155/ and view the content (should be Tim Spratt and a Blue OS X "X". But what i need to do now is make it so that when people type in a domain (the one i am going to use is "ultramadness.com") it will go to my mac site. I have made 2 name servers with ns1 and ns2 pointing to my IP, but they dont work. I think i need to change the DNS on my mac. At the moment, my mac Ip can be accessed by http://AC8D85E8.ipt.aol.com/.

    CAN ANYONE HELP???
     
  2. btree macrumors newbie

    Joined:
    Sep 9, 2006
    Location:
    USA
    #2
    There's your problem. You have to have actual nameservers running, on a different host than your machine. You can't just have the nameservers be aliases for your ip address. I recommend you check out http://freedns.afraid.org/ and add your domain name there. It's free, and it'll let you point your domain name to your ip address. Then you would set your nameservers to ns1.afraid.org, ns2.afraid.org, etc.

    So there's nothing wrong with the configuration on your mac.
     
  3. SBT thread starter macrumors member

    Joined:
    Apr 5, 2006
    Location:
    England
    #3
    I created ns1.ultramadness.com and ns2.ultramadness.com and they have the macs IP address then i configured ultramadness.com to those 2 name servers. Is that ok?
     
  4. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #4
    Code:
    $ dig ultramadness.com
    
    ; <<>> DiG 9.2.2 <<>> ultramadness.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 16372
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;ultramadness.com.              IN      A
    
    ;; Query time: 21 msec
    ;; SERVER: 192.168.1.1#53(192.168.1.1)
    ;; WHEN: Sun Sep 24 10:09:16 2006
    ;; MSG SIZE  rcvd: 34
    
    Code:
    $ dig @ns1.ultramadness.com www.ultramadness.com
    
    ; <<>> DiG 9.2.2 <<>> @ns1.ultramadness.com www.ultramadness.com
    ;; global options:  printcmd
    ;; connection timed out; no servers could be reached
    
    Do you actually have BIND (named) running on your machine and serving requests? It doesn't look that way.
     
  5. SBT thread starter macrumors member

    Joined:
    Apr 5, 2006
    Location:
    England
  6. Shadow macrumors 68000

    Shadow

    Joined:
    Feb 17, 2006
    Location:
    Keele, United Kingdom
    #6
    Why don't you try kicking it :p?

    Seriosly though, I wanna know this too.
     
  7. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #7
    It comes with OS X.

    The tricky part will be the zone files. OS X client doesn't have all the magical GUI tools, you have to set them up by hand.

    Here are the basic steps to get the daemon running, and Google will turn up plenty of named and BIND tutorials to get your DNS entries configured.

    I will echo what was written above, though: this is okay for messing around, but if you really want any reliability the name servers should not be running on the same machine as the web server, and you really should have two actual name servers (each running on a separate network).

    [edit: I notice that OS X includes BIND 9 these days, make sure you check for that in your searches. The link above may be slightly crufty. ]
     
  8. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #8
    Make your life easy, sign up for an account at MyDomain and then use their domain pointing feature to redirect to your IP.
     

Share This Page