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.

16 of 172 comments (clear)

  1. As always.... by herrvinny · · Score: 2, Informative
  2. Re:Cookbook format... by GreggBert · · Score: 5, Informative

    I bought this book a few weeks ago and the section on keeping your images from being bulk downloaded alone was well worth the cost of the book in terms of what it will probably save me in bandwidth charges.

    --


    If you don't understand anything I post, please accept that I ate paste as a small boy...
  3. Re:Why by Erratio · · Score: 5, Informative

    Version 2 is a vastly different program. The framework is different and the modules are different. If people don't need any of the features from 2 and 1.3 continues to be stable and secure, then it wouldn't make sense for most people to upgrade, or for some people to take the time at the moment to familiarize themselves with the new methods of doing things.

    --
    I don't try to be right, I just try to make people think
  4. Yes, it's difficult. by SharpFang · · Score: 5, Informative

    The 'httpd.conf' file is a long and critical one.

    For this reason, and for several more, whenever I don't need any of the multitude of Apache features, I install one of "mini servers" - for quite a while I was going on Boa, later switched to Mathopd, but I consider THTTPD or any of several other "tiny" webservers. Small, smart, fast and easy to configure. WAY easier than Apache.
    (yeah, you may think you configured Apache right because it works... but what if you just opened several security holes you didn't understand? It's much better to have a tiny config file you can use for 8 things out of which you need 6, and understand all thoroughly, than one with 400 things out of which you need 12 and understand thoroughly less than 50.)

    --
    45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
  5. Re:Apache is damned good. by pclinger · · Score: 4, Informative

    You may want to check out webmin, it has a useful GUI interface for Apache and everything else on your system.

    --
    /. editors made it impossible to link to file:///c:/con/con in my sig. Please just type it in
  6. True That! by Anonymous Coward · · Score: 1, Informative

    I mean when php breaks under 2.0 you do not know if it was php or apache that broke. Under 1.3 you can be pretty damn sure that it was php that broke due to one of their "keep the language functions changing randomly for no reason so as to break apps" approach to keeping php going.

  7. Re:Use Apache! by Saganaga · · Score: 1, Informative

    Is it that hard to write your own comment, instead of plagiarizing someone else's?

  8. Re:Use Apache! by curtisk · · Score: 3, Informative

    Servlets/JSP are handled by Jakarta/Tomcat, webservices are handled by Axis both are Apache projects

    --

    Sehr geehrter Toilettenbenutzer!

  9. That's a book referral, not an affiliate by Anonymous Coward · · Score: 1, Informative

    Try it yourself. Got o Amazon.com and type in the book's name, then compare the URIs.

    Test before you post.

  10. Re:Apache is damned good. by llamalicious · · Score: 4, Informative

    If you're talking about virtual hosting, and you're setting up many many hosts with separate VirtualHost directives, it may be time to look at mod_rewrite ... and the documentation on it at httpd.apache.org. There's a section about using mod_rewrite for mass virtual hosting, which, depending on your situation, might be useful.

  11. Re:great book by Saganaga · · Score: 3, Informative

    This is the second time in the same thread that you have posted a plagiarized review. What gives? How stupid are you, anyway?

    Exhibit A: The customer review section from Amazon. Note that the first review matches the above review.

    Exhibit B: The first plagiarization post in this thread. Note how it is eerily similar to the second customer review in the Amazon page.

    Exhibit C: relrelrel's comment (as an Anonymous Coward) complaining about the first time I pointed out his plagiarization. But if it truly was your own comment (which is possible, I concede), how is it possible that you actually wrote both Amazon customer reviews??

    I rest my case, your honor.

  12. With respect to the monolithicness of the file... by dirkx · · Score: 2, Informative
    My favourite is simply
    # Suck in configs for the various sites...
    #
    include /usr/local/etc/www-sites
    And simply fill that directory with small little config files, one per site or logical function. Or often, symbolic links to the actual files in their project directory which are under cvs control. (Use something like .../*.conf to limit where needed).

    Some care is needed with perms; apache will quite happily such in what is there; and careless use of symlink or allowing the creation of such may cause security holes.

    Dw.

  13. Re:Why by Anonymous Coward · · Score: 2, Informative

    That's right. Supposedly, it's very unstable. Or, if you want to take the opinion of somebody with actual experience in running PHP (4.3.x) with Apache (2.0.4x), it's just as stable as running Apache 1.3 with PHP, as long as you stick to the prefork MPM (the compiled-in default).

  14. Test after every config/code change by justMichael · · Score: 3, Informative

    You should be running your server through the ringer every time you change something or new holes are found, every 2 weeks is a decent number.

    This is just one of many steps to consider ;-)

    It's a good idea to have a box local that is configured exactly like your live one for this, the tests can eat a lot of bandwidth and make a mess out of your logs. Of course if you are testing the box as a whole there is no substitute for testing the live box.

  15. Re:Why by lisany · · Score: 2, Informative

    People rarely speak up when things work. Good thing, too. Who wants to have their search results cluttered with "I just installed Apache and it works!" pages?

  16. Re:Use Apache! by KlomDark · · Score: 2, Informative

    Maybe the part that runs ASP/ASP.NET code? Out of the box, with no additional software to install. I dunno... Who's deluded?