TweetFollow Us on Twitter

Nov 99 Online

Volume Number: 15 (1999)
Issue Number: 11
Column Tag: MacTech Online

MacTech Online

by Jeff Clites <online@mactech.com>

Apache, Of Course

Over the past several months we've touched on a variety of software packages which originated within the open-source and Unix communities, but which are poised to become important to the Macintosh with the advent of the Unix-based Mac OS X family. But we haven't yet covered one of the most important pieces - Apache. Despite all of the press which Linux gets, the Apache web server is probably the most successful open-source project of all time. To quote the famous statistic (from the Netcraft Web Server Survey), it serves over 55% of the sites on the internet, which according to the Apache FAQ amounts to over 3 million servers.

The Apache Software Foundation
http://apache.org/
The Netcraft Web Server Survey
http://www.netcraft.com/survey/
The Apache Server FAQ
http://apache.org/docs/misc/FAQ.html

On the face of it, there isn't much to talk about-Apache comes preinstalled with Mac OS X Server, and it just works; you don't have to port, compile, install, or really even configure it. If you are only interested in serving static HTML pages or WebObjects applications, you barely have to lift a finger. But if you want to go further and write modules for your web server's plug-in API, or take advantage of the availability of its source code, then the fun begins.

Using Apache

As your first step in going beyond the basics, you'll probably want some general information on running and administering Apache. The best place to start is Apache's online user manual, of course. For those who prefer printed material, O'Reilly and Associates has published Apache: The Definitive Guide (ISBN 1-56592-528-9), and there's even a sample chapter (on security) on their web site. If you prefer a more nuts-and-bolts reference, the Apache Server Administrator's Handbook (ISBN 0-7645-3306-1) looks promising. For those interested in diving into Apache's source code, check out Apache Server Commentary: Guide to Insider's Knowledge on Apache Server Code (ISBN 1-57610-468-0), which explains the innards in great detail.

Apache User's Guide
http://apache.org/docs/
Apache: The Definitive Guide
http://www.oreilly.com/catalog/apache2/

A great source for ongoing information is the Apache Week ezine, published every Friday. Recent issues have covered a variety of useful topics, notably an heads-up on what's coming in Apache 2.0 (and why a 2.0 version is needed at all), and an introduction to HTTP/1.1. And be sure not to miss their Hints and Tips section, which answers those questions you were just about to ask, and their very nice Links page, which will point you to a wealth of resources on server-related standards and technologies as well as further information about Apache itself.

Apache Week
http://www.apacheweek.com/
Apache 2.0 Preview
http://www.apacheweek.com/features/apache20
HTTP version 1.1
http://www.apacheweek.com/features/http11
Apache Hints and Tips
http://www.apacheweek.com/tips/tips
Apache Related Links
http://www.apacheweek.com/docs/links

Extending Apache

Once you know what it does, it's time to start mucking with it (the programmer's credo). As I touched on above, Apache has its own plug-in API; by writing Apache modules you can intercede at any of the eight steps of its request-handling process. This is similar to Netscape's server API, NSAPI, although Apache's approach lets you step in at a few more places. (If you are familiar with WebObjects' request-response loop, the process is conceptually very similar.) Apache takes this plug-in approach seriously, and in fact uses it to implement some of what could be considered the core functionality of a server-for instance, access to CGIs is handled by the mod_cgi module. Another important example is the mod_WebObjects module provided by Apple as a better-performing alternative to the default CGI-based adaptor for serving WebObjects applications. Check out the Apache API notes (again part of Apache's own documentation) for an introduction, and a paper which Robert Thau presented at the Fifth International World Wide Web Conference for an explanation of the considerations behind its design.

Apache API notes
http://www.apache.org/docs/misc/API.html
Design considerations for the Apache Server API
http://www5conf.inria.fr/fich_html/papers/P20/Overview.html

You can write Apache modules in C, but you can also write them in Perl, and if you are familiar with Perl or are interested in learning it, this is a perfect place to apply it. Perl's text-manipulation facilities and high-level data structures, combined with its own large body of powerful community-developed libraries, can make quick work of seemingly complex tasks. A great resource for learning about writing Apache modules comes once again in the form of an O'Reilly book, Writing Apache Modules with Perl and C (ISBN 1-56592-567-X), which will give you the full scoop on writing modules to extend Apache's functionality. (I'm beginning to sound like a broken record, but I promise I'm not on O'Reilly's payroll.) Several of its chapters are available online on the author's accompanying web site.

Writing Apache Modules with Perl and C
http://www.modperl.com/

Also, check out the Apache/Perl Integration Project site for more information about mod_perl. In addition to letting you write Apache modules in Perl, this module improves the performance or Perl-based CGI scripts by embedding a Perl interpreter within Apache itself, and caching scripts in such a way that they can respond to requests without the overhead of launching the interpreter and compiling the script again each time. (Usually, web servers handle CGI requests by launching the CGI application again for each incoming request.) Although this does require you to rewrite your CGI scripts slightly, the speedup can be dramatic, especially for short scripts, whose startup overhead consumes much more time than actually generating the response.

The Apache/Perl Integration Project
http://perl.apache.org/

Getting Involved

Although Mac developers don't need to worry about having to port Apache, that doesn't mean that there isn't work to be done. There are a number of spin-off projects which could use a hand, and the Apache GUI project, for instance, just has Macintosh written all over it. So if you want to get your hands dirty with the open source community, then check out the Related Projects page and you might find something which grabs your interest. (Java servlets, anyone?) And don't forget, working on a piece of software with millions of grateful users can do wonders for your résumé.

Projects of the Apache Software Foundation
http://apache.org/foundation/projects.html
Apache-Related Projects
http://apache.org/related_projects.html
Apache GUI-Dev Project
http://gui.apache.org/

Commercial Tools

It will be interesting, going forward, to see how Apple manages to make its server offering into an actual product, since it is based around tools you can get elsewhere for free. One approach is to provide a rich set of management tools which liberate you from the vagaries of complex configuration files. This seems to be the approach taken by Tenon Intersystems, vendors of WebTen, which brought Apache to the classic Mac OS by providing a Unix emulation environment. For Mac OS X Server they have developed iTools, which brings web-based configuration to Apache and provides additional services (such as DNS and SSL). For the near future, iTools is probably the easiest way to access and manage some of Apache's more advanced features, such as virtual hosting.

WebTen
http://www.tenon.com/products/webten/
iTools
http://www.tenon.com/products/itools/

Alternatives

If Apache's popularity and openness have failed to win you over, you might want to explore your options. Netcraft has an extensive list of links to web server companies, and you can probably find any server you've ever heard of listed here. For a little more guidance, intenet.com's WebServer Compare site lets you search for a server based on the features you want, or you can just look at their quick compare list to get and idea of what's available. Finally, the World Wide Web FAQ has brief descriptions of a number of popular servers-it's a bit out of date but still a good place to start if you really are not sure what server you want to use. Most of the servers listed on this site will be Unix-based, but if you are looking to replace Apache then I am going under the assumption that you are operating under Mac OS X Server. You have a smaller range of choices if you want to run your server under the "classic" Mac OS, but that's a topic for another column.

Netcraft's Directory of Web Server Home Sites
http://www.netcraft.com/Survey/servers.html
WebServer Compare
http://webservercompare.internet.com/
WebServer Quick Compare
http://webservercompare.internet.com/cgi-bin/quickcompare.pl
World Wide Web FAQ
http://www.boutell.com/faq/oldfaq/index.html

Finally, if you just want to update your Mac OS X Server Apache installation to the latest version, check out the article on Stepwise, which tells you how to do it and what to watch out for.

Building Apache 1.3.9 for Mac OS X Server
http://www.stepwise.com/Articles/Workbench/BuildingApache1.3.9.html

Once you've set up your server, come to ours and visit the MacTech Online web pages at www.mactech.com/online/, where you'll find links to even more useful things.

 
AAPL
$101.58
Apple Inc.
+0.00
MSFT
$46.52
Microsoft Corpora
+0.00
GOOG
$584.77
Google Inc.
+0.00

MacTech Search:
Community Search:

Software Updates via MacUpdate

Delivery Status 6.1.2 - Check delivery s...
Delivery Status displays delivery status of packages for a variety of shipment services. Can't wait for your packages to arrive? Don't waste your time checking the site constantly, just open this all... Read more
Mavericks Cache Cleaner 8.0.9 - Clear ca...
Mavericks Cache Cleaner is an award-winning general purpose tool for OS X. MCC makes system maintenance simple with an easy point-and-click interface to many OS X functions. Novice and expert users... Read more
OneNote 15.2.2 - Free digital notebook f...
OneNote is your very own digital notebook. With OneNote, you can capture that flash of genius, that moment of inspiration, or that list of errands that's too important to forget. Whether you're at... Read more
Apple Configurator 1.6 - Configure and d...
Apple Configurator makes it easy for anyone to mass configure and deploy iPhone, iPad, and iPod touch in a school, business, or institution. Three simple workflows let you prepare new iOS devices... Read more
SpamSieve 2.9.16 - Robust spam filter fo...
SpamSieve is a robust spam filter for major email clients that uses powerful Bayesian spam filtering. SpamSieve understands what your spam looks like in order to block it all, but also learns what... Read more
OS X Server 3.2.1 - For OS X 10.9.5 Mave...
OS X Server is the next generation of Apple's award winning server software. Designed for OS X and iOS devices, OS X Server makes it easy to share files, schedule meetings, synchronize contacts, host... Read more
Apple Security Update 2014-004 - For OS...
Apple Security Update is recommended for all users and improves the security of Mac OS X. For information on the security content of this update, please visit this website: http://support.apple.com/... Read more
OS X Mavericks 10.9.5 - The latest versi...
Apple OS X Mavericks is the latest release of the world's most advanced desktop operating system. Now free! With more than 200 new features, OS X Mavericks brings Maps and iBooks to the Mac,... Read more
iExplorer 3.5.0.0 - View and transfer al...
iExplorer is an iPhone browser for Mac lets you view the files on your iOS device. By using a drag and drop interface, you can quickly copy files and folders between your Mac and your iPhone or... Read more
BusyCal 2.6 - Powerful calendar app with...
BusyCal is an award-winning desktop calendar that combines personal productivity features for individuals with powerful calendar sharing capabilities for families and workgroups. BusyCal's unique... Read more

Latest Forum Discussions

See All

HipstaFox Review
HipstaFox Review By Jordan Minor on September 18th, 2014 Our Rating: :: FANTASTIC MR. FOXUniversal App - Designed for iPhone and iPad HipstaFox is a great single that makes players long for the whole album.   | Read more »
Ninja Raft (Games)
Ninja Raft 1.0 Device: iOS Universal Category: Games Price: $.99, Version: 1.0 (iTunes) Description: ** Special Launch Price ** "Ninja Raft is definitely the game to play if you’re into Tower Defense games and want to play something... | Read more »
Paste+ | Clipboard Action Widget (Produ...
Paste+ | Clipboard Action Widget 1.0.0 Device: iOS iPhone Category: Productivity Price: $3.99, Version: 1.0.0 (iTunes) Description: Powerful clipboard widget for iOS 8. Reimagine what you can do with your clipboard! Paste+ is a... | Read more »
Agenda+ | Calendar & Reminder Widget...
Agenda+ | Calendar & Reminder Widget 1.0.0 Device: iOS iPhone Category: Productivity Price: $1.99, Version: 1.0.0 (iTunes) Description: Best Calendar and Reminder Widget Ever for iOS 8 | Read more »
Leg·end·ar·y (Games)
Leg·end·ar·y 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: Simple and yet complex. Leg•end•dar•y is a grid-based puzzle game based on numbers. Discover the adventure of Leg•end•dar•y and... | Read more »
KuaiBoard (formerly QuickBoard) (Utilit...
KuaiBoard (formerly QuickBoard) 1.0 Device: iOS Universal Category: Utilities Price: $1.99, Version: 1.0 (iTunes) Description: KuaiBoard is currently 50% off for launch! Billing info. Signatures. Locations. KuaiBoard allows you to... | Read more »
Treasure Fetch - Adventure Time (Games)
Treasure Fetch - Adventure Time 1.0.1 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0.1 (iTunes) Description: Adventure Time Treasure Fetch is a fresh take on the classic Snake game! STRETCHY JAKE Snake your way... | Read more »
Light in the Dark (Games)
Light in the Dark 1.1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.1.0 (iTunes) Description: Be enlightened by this delightful puzzle game that has never before seen the light of day! "A physics and color-blending... | Read more »
Transmit iOS (Utilities)
Transmit iOS 1.0 Device: iOS Universal Category: Utilities Price: $9.99, Version: 1.0 (iTunes) Description: >> LAUNCH SPECIAL: Transmit iOS is ONLY $10 for a LIMITED TIME. << THE #1 FILE TRANSFER CLIENT FOR THE MAC NOW... | Read more »
Minuum - The Little Keyboard for Big Fin...
Minuum - The Little Keyboard for Big Fingers 1.0 Device: iOS iPhone Category: Utilities Price: $1.99, Version: 1.0 (iTunes) Description: Type faster, see more of your screen, and take control of autocorrect with Minuum: the little... | Read more »

Price Scanner via MacPrices.net

16GB iPad Air on sale for $449, save $50
Walmart has the 16GB iPad Air WiFi on sale for $449 on their online store for a limited time. Choose free home shipping or free local store pickup. Their price represents a $50 savings over standard... Read more
13-inch 256GB MacBook Air on sale for $1099,...
B&H Photo has the 2014 13″ 1.4GHz 256GB MacBook Air on sale for $1099.99. Shipping is free, and B&H charges NY sales tax only. Their price is $100 off MSRP. Read more
Toshiba Introduces TransMemory ID High-Speed...
Toshiba’s Digital Products Division (DPD), a division of Toshiba America Information Systems, Inc., today introduced the TransMemory ID USB 3.0 Flash Drive, a simpler storage solution for people who... Read more
New iPads and OS X Yosemite Release Coming Oc...
The DailyDot’s Micah Singleton reports that Apple is planning to hold its next product announcement event on Oct. 21, at which it will unveil the iPad Air 2 and iPad mini 3 and release a final build... Read more
Logitech Bluetooth Multi-Device Cross-Platfor...
Logitech has an enviable track record of making some of the best computer keyboards and mice. At least in my estimation, the best freestanding keyboards I’ve ever used have been Logitech units,... Read more
Roundup of Apple refurbished iPad Airs and iP...
Apple is offering Certified Refurbished iPad Airs for up to $140 off MSRP. Apple’s one-year warranty is included with each model, and shipping is free. Stock tends to come and go with some of these... Read more
Sprint offers 16GB iPad mini for $199.99 with...
Sprint is offering 1st generation 16GB iPad minis for $199.99 with a 2-year service agreement. Standard MSRP for this iPad is $429. Their price is the lowest available for this model. Read more
2.5GHz Mac mini remains on sale for $549, sav...
B&H Photo has the 2.5GHz Mac mini on sale for $549.99 including free shipping. That’s $50 off MSRP, and B&H will also include a free copy of Parallels Desktop software. NY sales tax only. Read more
Apple refurbished iMacs available for up to $...
The Apple Store has Apple Certified Refurbished iMacs available for up to $300 off the cost of new models. Apple’s one-year warranty is standard, and shipping is free. These are the best prices on... Read more
13″ 2.5GHz MacBook Pro offered for $100 off M...
B&H Photo has the 13″ 2.5GHz MacBook Pro on sale for $999.99 including free shipping plus NY sales tax only. Their price is $100 off MSRP. Read more

Jobs Board

*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.