How do I make my Mac into a Web Host and Mail server? 

 
 
Rank
Total Posts: 3
Joined  2006-05-10

Can anyone help or put me in the right direction. Maybe theres some online instructions or a guide somewhere?

Having just built my own website (some friends have too) I think it is too damn pricey to pay a website host provider money each month for very little online space. I would like to turn my second mac into a host for both mine and my friends sites, thus hosting for free.

This will also be great as i wont be limited with host space (well the max HD of the machine I suppose) being able to host larger quicktime movies and larger images etc would be really be amazing.

Is anyone able to give any suggestions?

Avatar
RankRankRankRank
Total Posts: 251
Joined  2005-02-16

Sure there are a couple of parts to this. The first is your network connection itself, and the second is the software on your machine.

The machine part is pretty easy. OS X Tiger includes Apache, which is an industry-leading web hosting piece of software. You can also very easily get php and mysql going on your Mac to install any number of LAMP blog products (open source and otherwise).

To start up your web server go to System Preference/Sharing and active Personal Web Sharing.

If you machine is directly connected to the internet you are all set. If not, you need to open up port 80 on your router to point to your machine.

Now to the network connection. In order to get the outside world to see you machine users will have to enter in your IP address. The problem is almost all broadband connections are dynamic, meaning the IP address can change. There are a number of services out there that help alleviate this issues, one of the best is dyndns.org. For the fabulous price of free you can get a domain from them like mywebsite.unixrocks.com. They have a few domains like unixrocks, etc. available. Once you are registered Dyndns matches your IP address with your account and pushes any requests from the web to the address you have signed up with to your computer where your website is hosted. They even have a little app you can download that will ping Dyndns whenever your IP address changes.

There are other things to consider in setting up a home server, stuff like backup, power backup, and the fact that your connection is often shared (and that upload speeds are always slower). But for a pet project or a small site it can be a good way to go.

Did that help?

Rank
Total Posts: 3
Joined  2006-05-10

Thanks, I havent yet had a chance to check all the various stages you have pointed over in your post. I have checked on my computer thatsrunning Tiger, at it doesnt appear to have the Apache software you mentioned.

I will sit down one evening this week and try and work it out.
I would like to post again if there are any questions i may have if that Ok with you?

Many thanks for you help!

Rank
Total Posts: 3
Joined  2007-05-05

Came across this post from last year. I tried it out and it works well. Question is, how do I go about creating links to folders and files on my Macbook Pro?

I couldn’t figure it out.

Thanks for the help.

Dev

Rank
Total Posts: 1
Joined  2005-08-27

Self hosting! Are you mad.

Unless you’re running a site that will have next to no visitors, or it’s just to ‘play with’ then you’re opening yourself up to all manner of problems.

Why put yourself through that (unless, as I say, it’s to play with) when for peanuts you can shove those problems onto someone else’s plate?

Avatar
Rank
Total Posts: 2
Joined  2005-09-13

I have to agree with hitchhiker. It’s not worth the headache. I tried that years ago and almost when mad. And webhosting is so cheap and usually includes free domain registration. So you wouldn’t end up with a clunky URL and you don’t have to worry about problems beyond the occasional outage.

Avatar
Rank
Total Posts: 11
Joined  2005-07-20

Also, it should probably be mentioned that hosting your own website is probably a violation of your ISP’s terms of service. 

I know people like to go against “the man” but in this case, your uplink bandwidth is likely so small, that even a relatively low usage site can gobble up your pipe, especially when bots and spammers start trying to attack the box (and it will happen).  Even if they don’t break into the machine, they will clog your pipe and slow you internet connections.

Site hosting is less than $5 a month from many places and includes PHP/MySQL, pre-installed software (like popular blogs, wikis, etc) and other niceties. Why open your machine to hackers when a hosting company has all the appropriate tools to thwart security threats for a relatively low price?

Less than $100 a year is not so much to ask and will likely save you a huge amount of headache.

Rank
Total Posts: 2
Joined  2007-05-28

Ignore the naysayers.  I ran my first mac web and mail server on OS 8.6 on a pizzabox performa (NetPrezentz+ Stalker SIMS).

Now it’s split into two OS X boxes: a mini for the web server and a G3 350 for mail.

It’s fun and educational and definitely worth doing.

There’s a good guide at ISP-In-A-Box that I followed.

Rank
Total Posts: 1
Joined  2008-11-09

Just wanted to mention that the ISP in a box refered to by the previous poster is out of date I’ve transferred all the content to a new domain http://diymacserver.com where it is kept up to date.

Please note that self hosting is still a viable option, I know and have helped several people getting everything up and running. You can host your mini at a datacenter as well, I ‘ve got a mini a http://macminicolo.net running my mail and sites.