How to enable the Apache web server on OS X Mavericks
The Mac’s OS X operating system has tons of software actually tucked into in that makes it so great for people like me who loves Linux. For instance, besides having an FTP server pre-installed, the Mac actually has a full-blown web server pretty much configured to run on OS X.
Others might not be aware of it, especially now that enabling the web server software has now been removed from the OS X System Preferences app.
Activating and using the Apache Web server software on the OS X Mavericks is actually simple. All you need is the same launchctl program used in enabling the FTP server in my past post.
Launchctl is a program that enables owners of Mac computers to load/unload apps that generally run in the background.
To load the Apache Web server, open up the Terminal app. Type the command:
sudo -s launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
The Apache Web server in OS X Mavericks is needed if you want to, for example, install and run a local copy of WordPress.
Once you’ve loaded the Apache Web server software, you can check if it is now running in the background by opening the Safari web browser on the Mac and typing http://localhost/ in the address box. You should get a result similar to the image below.
If you got the same result, you now have a web server running on your Mac. If you want to learn more about Apache web server on your Mac, just read a local copy of the manual using the Safari browser. The manual is located at http://localhost/manual.
To unload the web server, use the same launchctl command by typing the following command in the Terminal app:
sudo -s launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
Gerry Ilagan is into mobile apps and WordPress development at @speeqs. He loves to write about electronics, the Internet of Things, mobile phones, and #crazyideas.