Thoughtful, detailed coverage of the Mac, iPhone, and iPad, plus the TidBITS Content Network for Apple consultants.

How to Bring Web Sharing Back to Mountain Lion

Apple does an excellent job of trumpeting new features in each release of Mac OS X, and OS X 10.8 Mountain Lion was no exception. But it’s important to distinguish the marketing discussion of new features from release notes about precisely what has changed, and one change might have escaped your notice: the elimination of the Web Sharing options in the Sharing pane of System Preferences. The open-source Apache Web server software is still present, but there’s no built-in way to turn it on and off without resorting to the command line.

Apple does acknowledge this move in a support article, essentially suggesting that if you want to run a Web site, you should get OS X Server, which costs an extra $19.99 in the Mac App Store. From a financial standpoint, OS X Server certainly isn’t a hardship, but that doesn’t mean that we should be happy about the removal of Web Sharing.

I won’t comment on whether OS X Server is appropriate for your Web serving needs at the high end, other than to note that we gave up on it several years ago for the TidBITS and Take Control Web sites. We needed more control over the configuration of Apache and other Web components than Apple provided, and flipping back and forth between Apple’s interface and the standard command line and configuration file methods of controlling things was troublesome.

Even for a small site, OS X Server isn’t necessarily appropriate, since it comes with a lot of baggage that’s overkill if all you want to do is start Web server software to test code that can’t be loaded from a static page (PHP, AJAX, Perl, etc.), to develop Web-based software for mobile devices, or even to use utilities that rely on Mac OS X’s built-in Web serving capabilities.

More bothersome is that by removing the Web Sharing options, Apple created an awkward situation for people who were running Web Sharing under 10.7 Lion. According to Chuck Shotton, who wrote the first Web server for the Mac — MacHTTP, which later became WebSTAR — Web Sharing settings under Lion are preserved when you upgrade to Mountain Lion, which means that you could end up with an active Web server that you cannot control in the same way you have under previous versions of Mac OS X. If you’re sufficiently technical, Brett Terpstra and Neil Gee have both posted instructions for addressing this and related Apache issues at the command line.

A simpler solution for anyone who wants to maintain access to the Apache Web server in Mountain Lion is Tyler Hall’s Web Sharing preference pane, which you double-click to install in System Preferences and then use to enable and disable Apache, just as you were accustomed to in pre-Mountain Lion versions of Mac OS X. Hall was able to create the simple Web Sharing preference pane due to his work on the $39.95 VirtualHostX, a utility that takes much of the complexity out of running multiple Web sites on a Mac; kudos to him for making it available for free.

It’s distressing to see Apple simplifying Mac OS X in ways like this, not so much because it’s difficult to bring the functionality back, but because features like Web Sharing have been a mainstay of Mac OS X for so long. Having them deprecated in this fashion is more evidence of how Apple’s vision for the future of the platform is evolving away from where it has been for so long. We can only hope that — if we are indeed slowly being reverted back to the days before so many capabilities were built into the operating system — Apple won’t prevent independent developers from stepping into the breach to maintain and extend such functionality.


Try productivity tools from Smile that will make your job easier!
PDFpen: PDF toolkit for busy pros on Mac, iPhone, and iPad.
TextExpander: Your shortcut to accurate writing on Mac, Windows,
and iOS. Free trials and friendly support. <>

Comments about How to Bring Web Sharing Back to Mountain Lion
(Comments are closed.)

David B  2012-07-30 12:56
And this is the reason I don't update to the latest version of a new Mac relase on day 1. I let others stumble across the land mines that Apple has strewn in our way of doing what we always have in the past, and see how others can provide work arounds for me.
When I do update (in about 53 days) I'm pretty sure that I'll have all the tools set aside to be able to move quickly to the new OS.
Chuck Shotton  An apple icon for a TidBITS Contributor 2012-07-31 14:48
One additional note on Apple's "helpfulness" in removing Web Sharing from 10.8. As you can see from the screen shot of Tyler Hall's preference pane, PHP is disabled. If you have customized your Apache config file, Apple graciously disables it and replaces it with their own stock version. So it's probably not just enough to turn the server back on with the prefs pane. You'll need to go make appropriate changes to /etc/apache2/httpd.conf or copy your old version back to that spot (hopefully from httpd.conf-previous in the same directory.)
Adam Engst  An apple icon for a TidBITS Staffer 2012-08-01 11:13
That sort of shenanigan is part of why we moved away from Mac OS X Server too - customizations were often overwritten. Perhaps it's better in the current versions of OS X Server, but I'd be careful to keep backups of any customized config files.
Tierno S Bah  2012-08-30 16:01
I went through the same wasteful experience on both the hardware (XServe) and the software (OSX Server). The Linux CentOS/Apache combo was --and remains-- the way out.
And in this case, I was able to copy httpd.conf~previous over the Mountain Lion version to enable PHP. Thanks for the tip.
Bryan Brodie  2012-09-01 09:40
I tried ML Server for about a week - it was so buggy, inconsistent and annoying that I wiped my HD and reinstalled 10.8 without it.

Since 10.7, "something" has happened to quality control at Apple. Lion / ML = Vista. With $90 billion in the bank, they need to spend some money on quality control.

10.4, 10.5 and 10.6 were pretty solid OS implementations (can't speak to the server versions though). Nowadays I feel like politicians have taken over Apple marketing & R&D - promises and lies...
Tonya Engst  An apple icon for a TidBITS Staffer 2013-10-19 15:39
I emailed the developer of this pane today, and he wrote back to confirm that this preference pane should still work nicely under 10.0 Mavericks.