Orage said:
That's interesting! Care to share how that works?
Thanks!
To learn how, I think I started here .. searched past posts, asked a couple of my own questions ... this was only a few weeks ago, but I don't remember exactly.
But yes, as Davidleblond said, go into the Sharing control panel and select "Personal Web Sharing." [If you have a router or other such external intermediary between your would-be server and the rest of the Internet, you will need to enable port forwarding so that incoming traffic to port 80 will know where to go.] If you have a static IP tied to that computer (or that router, as in my case), you are now pretty much set up .... but not with a domain name, just with the IP. Users typing in your IP, in other words, will go to your computer at this point I think, but there are other steps to get a www.foo.tld-type address to point there. If you have a dynamically assigned IP from your ISP ... there are sites out there that can help with this, but I have little personal experience.
Next you need to point your domain name to a nameserver that will tell the rest of the world what IP to go to when they type in www.foo.tld. You can set up your own, but apparently it is fairly difficult. I use a free service (
everydns.net) with no problems so far; there are other such services. Tell the nameserver that requests for www.foo.tld should point to your IP, set up the proper cname entries and such, wait for it to update (took about a day for mine), and that should be it.
To access your own sites from the server itself or other computers on your LAN, you will need to edit the hosts file (/etc/hosts in Terminal) and assign the server's LAN address to the tlds.
The default directory for your webpage is /Library/WebServer/Documents. Watch the permissions on any files you put in that default directory-- make sure what you want accessible to everyone is.
Next you can set up virtual hosts (I host 5 separate tlds on one static IP on one server), but that's another story ...
I'm SURE I'm forgetting something and/or getting something wrong; a search of this forum and a broader web search will also be helpful. Be sure to check the top sticky in this forum. Here are two articles I at least looked at, though I'm not sure to what extent I made use of them:
www.macdevcenter.com/pub/a/mac/2002/08/23/jaguar_server.html?page=1
www.mac360.com/index.php/mac360/more/home_server_home_web_site_799_700_a_month
Lastly, I do host
my own sites, but as I said, my traffic is virtually nil: almost all personal, friends and family, plus random hits from the occasional search or as linked from my macrumors profile. I have DSL, limiting my upstream traffic to 40KB/sec., which bogs down really fast in those incredibly rare instances when I have more than one visitor. It can also affect my own web use, since my server and my laptop are on the same LAN, sharing the same connection. So unless you want to devote substantial of your own resources to serving, it might just be better and even more cost-effective to hire it out.