Turning My Mac Into A Web Server

SBT

macrumors member
Original poster
Apr 5, 2006
42
0
England
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???
 

btree

macrumors newbie
Sep 9, 2006
7
0
USA
SBT said:
I have made 2 name servers with ns1 and ns2 pointing to my IP, but they dont work.
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.
 

SBT

macrumors member
Original poster
Apr 5, 2006
42
0
England
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?
 

iMeowbot

macrumors G3
Aug 30, 2003
8,636
0
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.
 

iMeowbot

macrumors G3
Aug 30, 2003
8,636
0
SBT said:
how do i get BIND for mac?
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. ]