Slashdot Mirror


Apache Cookbook

honestpuck writes "While Apache is possibly the most popular and ubiquitous open source project it is certainly not the most simple. One module alone, mod_rewrite, causes me almost more problems and regex wrestling matches than all other products combined. The 'httpd.conf' file is a long and critical one. In these circumstances the Apache Cookbook from O'Reilly might be a godsend. It is certainly a well-written, well-researched volume. Ken Coar has spent many years working on Apache and Rich Bowen has long laboured on the Apache documentation. They both know their stuff -- and if this is an example, both know how to write." Read on for the rest of honestpuck's review. Apache Cookbook author Ken Coar & Rich Bowen pages 223 publisher O'Reilly rating 8 reviewer Tony Williams ISBN 0596001916 summary A broad range of Apache admin topics covered well

The book has twelve chapters, covering everything from installation and adding modules through to proxies and performance. The chapter on security is the largest, it covers the topics well. By contrast I thought the chapter 'Aliases, Redirection and Rewriting' too short and could have benefited from some more 'recipes', but that may be due to my own bias - mod_rewrite is not an easy topic, and as I've said it causes me a great deal of grief.

It is laid out in a similar way to the Perl Cookbook: each recipe has a 'Problem' section followed by a 'Solution' and then 'Discussion.' In almost all the 'recipes' the 'Discussion' is longer than the 'Solution,' and I often found it far more useful and informative than the problem and its solution.

The Apache Cookbook covers almost all aspects and all parts of the learning curve for Apache. That will either be a strength or a weakness of this volume for you; with such a large and complex piece of software as Apache a single book cannot hope to cover it in a great deal of depth. For me this book was not really a cookbook, more a good source of well documented examples from which to create my own recipes,

My biggest problem reviewing a book like this is that after several years building and configuring Apache (even on an infrequent basis) quite a lot of this volume seems simple. You may also find it the same if you are the sort of person who is not afraid to pore over the documentation, get your hands dirty and make a few mistakes. If you like some hand holding and are just starting with Apache you may benefit from all of it.

That's not to say that I didn't personally find large chunks of this volume useful. Certainly I've gone over several of the recipes and their excellent explanatory text to shed some light on previously dark corners of Apache, particularly as the authors cover both Apache 1.3 and 2.0.

O'Reilly have the usual web page with a Table of Contents and example chapter. The example chapter, on error handling is well chosen as it is typical of the others and useful but not the most useful chapter.

I have recently been thinking that tech books fall into various sorts and there is one sort I'd call 'library books' - books you may not need to own, but will want to read every so often and would be good to have in your local or company library. Apache Cookbook is one of these, a book I'd recommend everyone coming to grips with Apache has close to hand, but it is not going to be constantly on your desk in the same way that Perl Cookbook might be for Perl programmers: to start off with, it's half the size and doesn't cover nearly as many topics. This one falls short of essential due to it's concentration on breadth. rather than depth. So my recommendation for this book is not that all Apache administrators should buy it, but you should have a copy close at hand.

You can purchase the Apache Cookbook from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

6 of 172 comments (clear)

  1. Cookbook format... by neiffer · · Score: 4, Interesting

    I really like the cookbook format as it allows me to see solutions in application. I have often found solutions to different (but related problems) by using the skill set. I'd love to pick this up!

  2. Why by eille-la · · Score: 5, Interesting

    Why is the 1.3 still so popular? Is the version 2 still unstable or something?

    1. Re:Why by elviscious · · Score: 4, Interesting

      PHP is one reason. Supposedly very unstable on 2.0

    2. Re:Why by markjl · · Score: 5, Interesting

      Short answer: Because of it's legacy and partially because 2.x isn't a revolutionary step forward and it took a while for 2.x to get out of beta. Also, 2.x probably benefitted the Windows platform and new module writers moreso than anyone else, IMHO.

      1.3x is what most people know, what most Apache modules are written for, and what most of the articles and tutorials on the web describe.

      Another example: Apache Toolbox still only compiles 1.3x and associated modules for you. (BTW: this is a great resource for trying new modules out when you can't find an RPM with what you need.)

      It's only now that I'm migrating production from 1.3x to 2.x, because I had seen that people had headaches getting PHP working (but no longer) and I waited for stable ports of some modules that I used in 1.3x.

      I do consider 2.048 to be worthy now, lots of RPMs and modules written for it.


      --Mark
      [ My opinions are my own, but you may share them! ]
      --
      My opinions are my own, but you may share them!
  3. Only if you want by leoboiko · · Score: 3, Interesting
    The 'httpd.conf' file is a long and critical one.


    But if you want you can use a more modular approach instead of keeping everything in one single file. Debian sid is currently experimenting with this in interesting ways in the apache2 packages.
    --
    Prescriptive grammar:linguistics :: alchemy:chemistry. Stop being a nazi and learn some science.
  4. Use Apache! by relrelrel · · Score: 1, Interesting

    Has there ever been an open source program as successful as the Apache web server? If we leave aside the various p2p freeware for music sharing, then perhaps none. Certainly, if we restrict our survey to web servers, Apache is head and shoulders above its peers. It is currently in its second major revision, 2.0, and is very stable and mature.

    This book gives you a good grounding in both installing and running it, even if you have never run a website before. Those of you who used earlier versions may recall various installation shell scripts. At one point, these only ran on unix platforms. But this book makes clear in the first chapter that this is no longer true. An installation wizard gives you an easy walkthrough. Plus you can now install it on Microsoft Windows.

    So given that Apache is free, shouldn't you already be using it? If you have only static content, or dynamic content that is restricted to the traditional cgi or the newer perl or PHP, then the book's sections on those show full functionality.

    Remember too the other advantage cited in the book. Apache is extensible. So if you have a simple need that can be met by tweaking the existing source, you can do it yourself, instead of asking a vendor and waiting [and paying]. Plus, if Apache itself has a bug that you cannot fix, you know there will be many developers on the net who will do this, and quickly, because so many of us depend on Apache.

    What are you waiting for?

    The only caveat is when you should NOT use Apache [and this book]. Naturally, the book does not go into this, so let me help you. If you will be using EJBs, Java Server Pages or transactions, then this is higher level logic that, as far as I know, Apache does not currently handle. Instead, you should opt for J2EE web servers provided by jBoss, Sun, IBM, BEA or Oracle. Likewise if you have .NET/C# dynamic content. I am not sure that Apache can handle these yet, so you should stick with Microsoft's server

    --
    --- any post that takes longer than 20 seconds to write, isn't worth writing