Chapter 9. Extending Apache

Chapter 9. Extending Apache

Difficult-o-Meter: 5 (as hard as this book gets!)

Covers:

Apache Web server

http://www.apache.org

Question: I want my Web server to do something unusual, like authenticate against a proprietary data store, log to a relational database, or provide real-time statistics about the machine it's on. I've looked for packages to do these things, but I can't find anything that will work to my satisfaction. What can I do?

Answer: Consider building an Apache module. I admit this violates one of Larry Wall's three great virtues of a programmer, namely, Laziness. But sometimes nothing else will get the job done, and writing a CGI is not an option. You'll have to hold your breath and dive into the world of Apache server extensions.

Apache is the most popular Web server in the world! There, I said it. It also happens to be the most flexible, thanks to the fact that it's completely open source. Apache was built with modularity in mind, and Apache run on Linux can realize its full potential for extensibility. In this chapter, I'm going to discuss how Apache modules are used to extend the server, and show how to write your own modules.

A word of warning: If you didn't read the Difficult-o-Meter, go back and do that. This chapter will probably put you off a little if you're not experienced with Apache or used to C programming. To discuss modules I'll need to delve into the Apache source code, configuration files, and API, and I'll be writing a module in C. If you feel comfortable with the language, you should have no problems understanding the details of what follows . If not, there's still plenty to follow.

 



Multitool Linux. Practical Uses for Open Source Software
Multitool Linux: Practical Uses for Open Source Software
ISBN: 0201734206
EAN: 2147483647
Year: 2002
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net