The recommended way to set up and run an OS X web server for a busy public website

apachemamposx-serverwebserver

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?

Best Answer

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.