Vous voulez voir cette page en français ? Cliquez ici.

Have one to sell? Sell yours here
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Writing Apache Modules with Perl and C: The Apache API and mod_perl [Paperback]

Doug MacEachern , Lincoln Stein
4.5 out of 5 stars  See all reviews (20 customer reviews)

Available from these sellers.


Join Amazon Student in Canada


Book Description

April 11 1999 156592567X 978-1565925670 1

Apache is the most popular web server on the Internet because it is free, reliable, and extensible. The availability of the source code and the modular design of Apache makes it possible to extend web server functionality through the Apache API.For the most part, however, the Apache API has only been available to C programmers, and requires rebuilding the Apache server from source. mod_perl, the popular Apache module used primarily for enhanced CGI performance, changed all that by making the Apache API available to Perl programmers. With mod_perl, it becomes simple to develop Apache modules with Perl and install them without having to rebuild the web server.Writing Apache Modules with Perl and C shows how to extend web server capabilities regardless of whether the programming language is Perl or C. The book explains the design of Apache, mod_perl, and the Apache API. It then demonstrates how to use them to perform for tasks like the following:

  • Rewriting CGI scripts as Apache modules to vastly improve performance
  • Server-side filtering of HTML documents, to embed special markup or code (much like SSI)
  • Enhancing server log functionality
  • Converting file formats on the fly
  • Implementing dynamic navigation bars
  • Incorporating database access into CGI scripts
  • Customizing access control and authorization to block robots or to use an external database for passwords
The authors are Lincoln Stein and Doug MacEachern. Lincoln is the successful author of How to Set Up and Maintain a World Wide web Site and the developer of the widely used Perl CGI.pm module. Doug is a consultant and the creator of the innovative mod_perl Apache module.

Customers Who Bought This Item Also Bought


Product Details


Product Description

From Amazon

Writing Apache Modules with Perl and C will allow you to enhance your Apache HTTP server in just about any way you'd like. Overall, it is an excellent book, and it has a lot of good information and terrific examples on everything from "Content Handlers" to customizing the Apache server configuration process.

It's quickly apparent that Lincoln Stein and Doug MacEachern spent valuable time writing this book considering the breadth of their subject and the depth they devote to it. The only downside to the book is that it's kind of hard to explain all of the API functionality without assuming a minimum level of competence from the audience. For that reason, this book might be a bit intimidating to novice programmers, but it really rewards you if you put time into it and tinker with things.

The book also works well as a source of ideas and inspiration for when you have to write your own server modules, and I'd recommend it if you want to customize your Apache server or speed up your Perl CGI programs. --Doug Beaver

From the Publisher

This guide to web programming shows how to extend the capabilities of the Apache web server. It explains the design of Apache, mod_perl, and the Apache API, then demonstrates how to use them to rewrite CGI scripts, filter HTML documents on the server-side, enhance server log functionality, convert file formats on the fly, and more.

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Reviews

Most helpful customer reviews
4.0 out of 5 stars A good book for Perl modules for Apache. May 11 2003
Format:Paperback
Not much there for C, although it's not too difficult to make use of the Perl topics and covert them to C, it's more geared towards Perl (much more). That's too bad. Still, it's a good book and is very useful for referencing as well as for people looking to learn more about this topic.
Was this review helpful to you?
1.0 out of 5 stars If you want C don't bother with this book March 1 2003
Format:Paperback
It's all in Perl. The book says "Apache Modules with Perl and C" but really, it's all in Perl. The only mentions I've seen in C are the very very beginning, and the end that restates the Apache documentation.
If you bought this book thinking it will have sample C code, you would be wrong.
If you like Perl, then this is the book for you, but if you prefer C, as I do, then you will have wasted your money.
Was this review helpful to you?
5.0 out of 5 stars My personal favorite reference Dec 19 2002
Format:Paperback
_Writing Apache Modules_ (WAM) is a high quality work, even amongst other O'Reilly books. Few/no typos and articulate writing, very usable index and good content organization, accurate and complete information, top notch Perl code. Yes, only about 5% of the code are in C, but the C API reference is there. I write Perl and C modules and I can use this book for both (though for specific C techniques, you'll probably be better off by reading the Apache developers and apache-modules mailing lists).
I haven't actually read the other mod_perl and developer-oriented Apache books out there but in my opinion this book is still indispensable if you plan to write Apache modules, either in Perl, C, or other languages. Especially if you write for mod_perl, this book is a great complement to the mod_perl guide. Stas' guide focuses on deployment and tuning issues (memory usage, speed, etc) while WAM focuses on the Apache API and how Apache can help you do the job by writing modules.
Personally, _Writing Apache Modules_ is still the most useful reference book to date. It's one that spends the largest amount of time on my desk.
And, oh yes, Amazon gives a good deal on this one ... .
Can't wait for the Apache 2 counterpart.
Was this review helpful to you?
Format:Paperback
A good tutorial starts out with something basic and gradually builds on it. This book starts out with three chapters of pure reference material. Granted some of this is a half-assed description of setting up Apache and compiling in mod_perl. I found the docs that come with the Apache and mod_perl source code to be far more useful (and accurate). Then you get this long list of Perl API classes, request object functions, Perl handlers, etc. All of which is wonderfully useful information ... presented at the wrong time ... we have yet to begin writing a useful module.
When we do begin the writing of a module, it isn't a basic, stand-alone module, but a module to add footers to other content. So, the text digresses into a long and technical discussion of the various ways to configure Apache and associate MIME types so that this module will work with documents that we might or might not have on hand (It's just assumed that you have these laying around handy). During this discussion, we get bounced off of other Apache::xyz modules that apparently popped into the author's head in a moment of "As long as we're at it, why don't we throw this in too" inspiration. Wonderful information ... presented at the wrong time.
To give an example: A logical place to start learning Oracle SQL (or any other SQL) would be with the SELECT statement. However, the authors of this book would begin with a detailed discussion of PL/SQL exception handling, a listing of most of the built-in PL/SQL exceptions, and a listing of a number of the built-in Oracle packages. (Recall we were just starting with SQL. But what the heck! PL/SQL is cool, so why not talk about it now? We're going to use it eventually anyway.
Read more ›
Was this review helpful to you?
5.0 out of 5 stars A web programming marvel Oct. 17 2001
Format:Paperback
I once read that you could not consider yourself a Unix Wizard until you had hand written a SendMail configure script once, and that no sane person ever did it twice.
The first part of that truism can perhaps be said of Web Wizards and Apache modules. Fortunately Apache modules are a little easier to write than Sendmail configurations and this book makes it easier still.
Let's not mince words. Perl scripts and other CGI software can quickly become performance bottlenecks on any server, no matter the size of your hardware. The most powerful way of fixing this is to fold a fair amount of that programming inside the server where the overhead of loading interpreters, libraries and code is already taken care of, not to mention you find yourself with much more power and control over the dialogue between server and browser.
Unfortunately writing to an API as large and complex as that in Apache is not always easy. MacEachern and Stein go to a great deal of trouble and exert a fair degree of skill in breaking the learning down into manageable chunks and explaining it all with a large number of examples.
This was the first book I read that really made me understand the process going on, both between the two pieces of software and inside Apache, when a page is requested. From there the book goes on to give you a marvellous understanding of how to write a module in Perl that fits into that process. Finally the last three chapters are excellent API reference guides, one on the Perl API and two on the C API, and an excellent index (which indexes every function in the API's as well as key concepts) make this a superb tool when you get down to writing.
Read more ›
Was this review helpful to you?
Want to see more reviews on this item?
Most recent customer reviews
3.0 out of 5 stars Its all Perl :-(
The book in and of itself, is great. Typical O'Reilly fare. But this book is 99% Perl.. anyone writing Apache Modules, isn't writing them in Perl. Read more
Published on Oct. 16 2001 by Chris
5.0 out of 5 stars unique and well done
Writing Apache Modules is a rather arcane specialty; with so many excellent free modules already available, most people can find more than the need with some simple... Read more
Published on May 23 2001 by Amazon Customer
5.0 out of 5 stars An Education for Web Developers
This book is a pleasure to read. It provides information on web development on the Apache/Perl platform in a very accessible and entertaining form without being dumbed down. Read more
Published on March 25 2001 by Edmund Mcguigan
5.0 out of 5 stars Great book!
Anybody who is interested in writing apache modules, MUST buy this book...
Its very straight forward, focuses only on things that are related to writing modules in both Perl... Read more
Published on Feb. 3 2000 by Vlad Khokholkov
5.0 out of 5 stars Excellent book
Doug and Lincoln's book is outstanding. I had no idea Apache could do so much. The book is also wonderful simply for the perl parts of the examples. Read more
Published on Sept. 10 1999
5.0 out of 5 stars a must have for apache developers!
This book offers comprehensive explanations and examples for developers who wants to tap into the power of apache via perl. Read more
Published on July 10 1999
5.0 out of 5 stars The best book which lets programmers to fully utilize Apache
The only authoritative book on Apache/mod_perl setting, which combines the two most powerful free software systems, Apache and Perl. Read more
Published on May 17 1999
4.0 out of 5 stars Tarzan like book, shiny..., book marry Tarzan?
It¹s succinct and enlightening.
It reduces days of surfing PODS (perl docs), man-pages (unix docs), and online Apache online references into a nice little kitty. Read more
Published on May 13 1999
Search Customer Reviews
Only search this product's reviews

Look for similar items by category


Feedback