I am moving from a VPS to a dedicated Mac mini server running Mavericks. All I want to do is serve a typical website using Apache, an nginx reverse proxy, PHP and MySQL.

My website isn't gigantic, but it's not tiny either: I typically serve a hundred thousand pageviews a day. It is a public site on the internet, not a local intranet. I am familiar with tweaking .conf files and fiddling in the terminal, but the idea of creating virtualhosts and manually setting up modules stretch my abilities.

I have had difficulty finding the right software solution for this task. From what I can tell, there are three basic ways:

  1. Use the inbuilt Apache provided by Apple and managed in Server.app. The configuration options are limited and certain advanced aspects (including using nginx, or anything much involving security) are not covered.
  2. Use Homebrew or plain old .tar.gz files to set up my own server, treating the OS X like any old Unix. While this would work, I am hoping OS X can help me avoid the quagmire of editing config files entirely on my own.
  3. Using Mac software like MAMP or AMPPS, though both of these appear to be outdated or unsupported, and seem geared towards local testing rather than production server use.

I would like to know of the best way to set up a Mac mini as a "real" web server, ideally with a solution that is both easy to configure and open to. Is there a well-known tutorial that I can follow? What of the alternate software recommended by this months-old article which ultimately recommended AMPPS, albeit for local testing?


For my own outward-facing servers, I did everything from within the built-in server software itself, except managing virtual hosts, for which task I used VirtualHostX.

The best tutorial I know for configuring Mavericks for web server use is done by Charles Edge, at his site, Krypted. I followed this same process essentially, and thus far, I've seen no issues since deployment.

  • Given that VirtualHostX appears to be even more bare-bones than Server.app at creating virtual hosts, do you feel that it’s a necessary part of the setup? I will only have 2-10 virtualhosts, and beyond the “Lift Off” stuff I don’t really see what this app offers. The Krypted site is excellent, however, thank you! – SuitCase Nov 12 '13 at 10:56

OS X have Apache. This is a pretty standard build, so you should be able to configure it to do just about anything you'd like. If you want to do this you may need to read up on apache configuration and such. There are numerous tutorials all over the place for setting up virtual hosts, etc.

Here's a walkthrough for setting up a server in Mountain Lion which is mostly similar in Mavericks: http://mwholt.blogspot.com/2013/03/install-nginxphpmysql-on-os-x-mountain.html

You could also just splurge on the OS X Server. It might not provided everything you are looking for out of the box, but it does make a number of administration task (including virtual servers) quite easy.

  • Given that there don’t appear to be Apple-supplied or (supported, up-to-date) GUI-based apps to manage MySQL and Nginx, the link you’ve supplied about using homebrew (on top of Apple’s Server.app Apache) seems like the only way. That’s fine, because the tutorial is very easy to follow, but I still wonder: for a production website, is this a secure, performant, “correct” way to do things? This page is for a “web development environment”… and I assume that I should be going above and beyond that for a site that will be heavily used and exposed to the wider internet. – SuitCase Nov 12 '13 at 11:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .