Book Image

Lighttpd

By : Andre Bogus
Book Image

Lighttpd

By: Andre Bogus

Overview of this book

Table of Contents (20 chapters)
Lighttpd
Credits
About the Author
About the Reviewer
Preface
HTTP Status Codes

Summary


As we have seen, writing modules, while not exactly easy, is certainly doable for an average C programmer. Lighttpd goes out of its way to make its plugin API powerful and simple to use. But before writing a plugin, we should ask ourselves a few questions:

  • Is the solution from outside of Lighttpd sensible?

  • Does the Lighttpd core or a standard module do the job?

  • Can I write a mod_magnet script to solve my problem?

  • Which standard module is the easiest to extend to solve the problem?

Only if we answer the first three questions with "no", we should consider writing a module. The fourth question gives us a hint if we should extend another module that solves a similar problem (be sure to read the license in COPYING first) or start from mod_skeleton.c, which is supplied with the Lighttpd source. Alternatively, feel free to use any of the implementations given in this chapter as a starting point. Oh, and if the result is a useful plugin, think about giving it back to the Lighttpd community. Thanks...