Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advantages/disadvantages of using the built-in Apache for web development on Mac OS X

Tags:

macos

workflow

What are the advantages and disadvantages of using the built-in Apache for local web development on Mac OS X, specifically 10.6 Snow Leopard?

Instead of using the built-in Apache, I know that options such as MAMP and XAMPP exist. However, for some reason I just haven't wrapped my head around the benefits or potential pitfalls with using the built-in Apache versus using a MAMP/XAMPP-based (or other) solution.

  • Is the advantage of a MAMP/XAMPP-based solution simply ease of configuration?
  • When not using the built-in Apache are there other benefits besides ease of configuration? For instance, is there a benefit similar to using virtualenv to avoid tainting a pristine Python install?
  • If you're only developing static webpages and don't need PHP or MySQL, then why not use the built-in Apache with something like virtualhost-sh or VirtualHostX to ease configuration?

Configuration and Usage Considerations

  • I am interested in using virtual hosts in order to simultaneously develop multiple websites
  • I use git for version control and have a tendency to store source files in ~/developmentinstead of ~/Sites (this probably isn't material, but thought I'd mention it)

Related Research

  • The answers to the SuperUser Question What is the best Apache PHP Setup for a Mac Developer talk about different MAMP, XAMPP, and roll your own solutions
like image 550
Matthew Rankin Avatar asked Feb 02 '10 12:02

Matthew Rankin


1 Answers

Advantages:

  • It's already there, you don't have to install anything
  • If all you are interpreting are .html files only, then it's fine.

Disadvantages:

  • You can't update it (Well you shouldn't. You can, it just feels hacky modifying stock system components).
  • If you wanted to enable PHP/MySQL etc later on you will be changing things in paths on the system that may break between OS updates.
  • If this is your primary OS, you are now running extra daemons (PHP/MySQL/Apache) in the background that eat up CPU cycles.

Overall though I wouldn't do it. MAMP's daemons are easy to start/stop and your changes are confined to MAMP. If you mess something up or need to quickly get different sites running with different settings it's kinda easier to blast things away in MAMP and start again (not that MAMP is without it's hassles).

If you don't want to use MAMP i'd suggest getting a dedicated Linux box (or use a Linux Virtual Machine) to do this on having been down the OSX Apache path before. It's not pretty. OSX's built in stuff might seem easier at first, but it's inflexible and eventually as your requirements grow you'll wish you hadn't done it.

Update: I would recommend going with XAMPP over MAMP. It has better performance and is updated more often. Plus XAMPP is Cross platform and Open Source :)

like image 134
Brock Woolf Avatar answered Sep 28 '22 03:09

Brock Woolf