Turning your Mac into a webserver

Here’s how to turn your Mac into a web/mail/ftp server with all the trimmings.
Apache is included and works just fine, just turn on web sharing in you preferences.
If you intend on hosting multiple sites, here’s a rundown on how to configure virtual hosts.
PHP comes included with Leopard but is disabled by default. You could enable it, however, it’s rather limited as a lot of extras aren’t included which can be rather useful on a webserver, such as GD support. It’s therefor better to download and install Entropy’s PHP package.
MySQL, just download and install the official build from here. I might make a followup post covering MySQL’s post install tasks such as setting the root password, creating users and databases from the command line.
Mail. By far the easiest and least hair pulling way to set up a full mailserver is by ploinking down $25 for MailServe Pro (or $15 for MailServe if you don’t care about Dovecot. I do because it’s faster and supports multilevel folder creation). You’ll have your mailserver up and running in under 5 minutes, well worth the money.
FTP, this can be useful if you use a different computer as your client machine, or if you want to allow other people access to your mac for their own sites. For this I use the excellent PureFTPd Manager.
And finally, seeing as you’ll undoubtedly be editing a lot of textfiles and the Mac’s TextEdit can mess them up, get TextWrangler for all your editing needs, it even integrates in your command line.


Comments are closed.

Work in progress... not home!
Trying to get all/most of the new code working before I start on the eyecandy.