I’m not a Mac, Windows, or Linux zealot. They each have their niceties and their quirks. But I would argue though that the Mac is not good to use as a web server:
- The PHP software that comes installed with Mac OS X doesn’t include the gd module, which is very commonly required by many applications, including Drupal and Moodle. You have to recompile PHP with the gd module yourself (which is very tricky on 64 bit systems), or use a third party binary. Other standard php extensions are also disabled in the Mac OS X version.
- Many servers and web applications also require cron jobs (crontab), tasks which run repeatedly at various intervals. Drupal and moodle require this as well, for example to send out emails, to fetch rss feeds, to create backups and run statistics. On the Mac, cron jobs can stop working after the server is rebooted. See this story and this workaround hack.
- LDAP on an OS X server is not standard, and does not work with the php-ldap module, again required by any PHP application that supports LDAP authentication. We had to code our own workaround to call Apple’s dscl tool to handle LDAP operations.
- I don’t consider this major, but all the standard folders and configuration files are in non-standard locations. Some of the renames are improvements over the standard I think, like Sites instead of public_html. But for example instead of /var/www, the main apache web home folder is /Library/WebServer/Documents. It takes much longer to type on the command line because you can’t tab-autocomplete “WebServer” – there is another folder there called WebObjects which interferes.
- It becomes a bigger problem when for example you want to edit the php.ini file, which most everyone invariably needs to do, in order to change things like the maximum supported file upload size. /private/etc/php.ini ?
- Apple is slow to update their software, not to mention you have to pay for upgrades. Their version of PHP had a security hole for many months last year. Some mac servers on our campus were blocked because of it.
- The Macs have long been way behind with respect to Java as well. You have to use a special 3rd party ‘SoyLatte’ build now to get the latest version. It didn’t help when Steve Jobs disavowed Java a few years after marketing OS X as the premier Java development platform.
- There is no official package management system for the Mac, like with apt-get for debian/ubuntu to make it easier to update software and install new software.
- The Mac uses cryptic XML files to store configuration information for its non-standard services like launchd.
- This is not server-specific, but often times there are a lot of duplicate files that start with a period when you copy stuff from a mac to another computer.
- Three reasons why GNU/Linux is better for Web servers than OS X
- XServes Are Awesome, But Server Administration Sucks
UPDATE: The new version of Mac OS X (Snow Leopard) apparently has more problems with php.