Apache Cookbook 172
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.
Cookbook format... (Score:5, Interesting)
Re:Cookbook format... (Score:5, Informative)
Re:Cookbook format... (Score:2, Funny)
;-)
Re:Cookbook format... (Score:1)
Thank you, dishonestpuck. I'm tempted to make you a friend just so I can track your trolling. Pity you don't supply some contact details on your Slashdot page so I can thank you in person.
Tony 'honestpuck' Williams
As always.... (Score:2, Informative)
Froogle Link [google.com]
That's a book referral, not an affiliate (Score:1, Informative)
Test before you post.
No it isn't. (Score:2)
Mod this Troll down.
Why (Score:5, Interesting)
Re:Why (Score:5, Informative)
Re:Why (Score:2)
Re:Why (Score:4, Interesting)
True That! (Score:1, Informative)
Re:True That! (Score:2)
One of the primary concerns of PHP upgrades over the past couple years has been backwards compatibility.
As a result, we're stuck with with some nasties (bad decisions early in the life of the PHP function library) like : x(needle, haystack) vs y(haystack, needle).
Those suck, yes, but at least your apps don't break.
S
Re:True That! (Score:2)
Various issues with session variables being registered globally.
Register globals.
Safe Mode (oh, you wanted to create directories? hope you have the same gid as the webserver and write access to php.ini).
Pass by Reference.
Running MySQL queries inside fetch_array loops.
One version suddenly wouldn't allow $array['key'], had to be $array["key"], this got fixed shortly after release.
The 2 latter didn't have config o
Re:True That! (Score:2, Insightful)
Re:Why (Score:2)
I googled on "php apache2 (bug|problem|issue|sucks)" and only got 34,500 hits so it can't suck that bad.
That being said, I have been using PHP4/apache2 exclusively for at least 18 months and I haven't had any problems.
Re:Why (Score:3, Funny)
Re:Why (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?
Re:Why (Score:1)
Re:Why (Score:2, Informative)
Re:Why (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 [apachetoolbox.com] 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! ]
Apache is damned good. (Score:3, Insightful)
Re:Apache is damned good. (Score:2)
Re:Apache is damned good. (Score:5, Informative)
Re: (Score:1)
Re: (Score:1)
Re:Apache is damned good. (Score:1)
Re:Apache is damned good. (Score:1)
Re:Apache is damned good. (Score:1)
The way it was done was pretty much just a couple of lines, which had to be perfectly set up. The largest error, definitely a user error on my part was attempting to modify too much of the httpd.conf before I really realized what I was doing. Googling
Re:Apache is damned good. (Score:2)
That approach makes it easy to script adding new domains. You can then go
Re:Apache is damned good. (Score:1)
Re:Apache is damned good. (Score:4, Informative)
Only if you want (Score:4, Interesting)
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.
With respect to the monolithicness of the file... (Score:3, Informative)
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
Yes, it's difficult. (Score:5, Informative)
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 [boa.org], later switched to Mathopd [mathopd.org], but I consider THTTPD [acme.com] 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.)
Sure but... (Score:3, Funny)
Obviously picking the right web server can be a tough proposition.
Re:Yes, it's difficult. (Score:2)
Shockingly, it's pretty easy to do that in Apache. Anything that doesn't look immediately neccessary in a LoadModule command gets commented out.
On one of my servers, the httpd.conf file is 277 lines long, a fairly daunting number. If you grep for lines starting with an alphanumeric character (which lets out comments and whitespace), you're down to 48 lines, hardly a scary number at all.
Re:Yes, it's difficult. (Score:2)
Your conf file is larger than most of the documents I serve up!
Test after every config/code change (Score:4, Informative)
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.
Sounds great. (Score:5, Insightful)
I'll definitely be picking this up.
Damon,
I don't understand... (Score:1)
Re:I don't understand... (Score:2)
It's a long, unnecessary way around, I've since learned. The book would still have been helpful though, and I still plan to get it.
Damon,
Use Apache! (Score:1, Interesting)
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
Re:Use Apache! (Score:1)
Re:Use Apache! (Score:2)
Re:Use Apache! (Score:1, Informative)
Re:Use Apache! (Score:4, Informative)
Re:Use Apache! (Score:1)
Re:Use Apache! (Score:2)
Re:Use Apache! (Score:1)
Re:Use Apache! (Score:4, Insightful)
The web server should always be simply a front-end to the application server. The web server functionality built into the application servers is very limiting. Let the web server be the web server, let the app server be the app server - Don't mix them up.
Put in Apache to handle the normal requests, with the appropriate Apache module to connect to the app server and pass the app server code requests to the app server (via the connector module) to be processed there, while leaving Apache free to serve normal web content.
This gives you the best of both worlds in performance and configurability. Any other way is buying into some marketing idiot's dream.
Re:Use Apache! (Score:1)
So which part of IIS is an application server pray tell? I think you're at the deluded end of the stick my friend.
Re:Use Apache! (Score:3, Informative)
Re:Use Apache! (Score:1)
IIS isn't an app server and never was intended to be. Depending on the mapping of an extension it hands off to the relevant ISAPI extension.
MTS/COM+ Services is where the app server is at.
And so what if it runs out of the box...?
Re:Use Apache! (Score:2)
Here's what I want to know: How can one set up an architecture with two servers where Server One runs ONLY IIS and handles all the web traffic, and passes all its ASP.NET processing off to Server Two, which only does ASP.NET processing?
After that, assuming you can do that, then how do you go about scaling that with Windows? Where you have multiple IIS boxes passing t
Re:Use Apache! (Score:2)
There's a big difference between splitting functionality up between two (or more) servers, actually building a serious, redundant, scalable nTier architecture, and simply running the ASP.NET stuff in an out-of-process mode.
Actually, I don't need to know how to run IIS itself in a redundant mode, WLBS or a
Re:Use Apache! (Score:1)
People forget or don't get that ASP.NET is a presentation tier technology (like JSP or PHP) and is just a part of the framework - so therefore why wouldn't I want my presentation tier technologies as near to the user i.e. the web server in the first instance?
Communication and hand off to the mid tier (built using
Re:Use Apache! (Score:2)
How about Bind? Or Sendmail? GCC? (Score:1)
Heh heh (Score:2)
Re:Problem. (Score:2)
Mind you GUI development in
Re:Problem. (Score:1)
I kinda think you need to get your facts straight. How about a concrete example?
Re:Problem. (Score:2, Insightful)
Re: (Score:2)
Re:Problem. (Score:2)
Well, obviously this is a troll, but it makes me cringe when I hear whiney arguments from people thinking that the only way to do anything "professional" is by using highly-bloated, high-level systems.
Yes, that's hard but you must admit that I have a point.
Yes, you have a point: You're "new school" that expects the available tools to compensate for your lack of initiative or ability to fi
Problem may be you! (Score:2)
This is typical garbage by snooty PHP haters, and is not supported by fact. I'm not going to get into a pointless argument with the "proud owner of a Mensa membership card"; clearly I'm not intellectually up to it. Besides, I'll probably become confused like a deer in the head lights when Mr. Mensa starts spewing "facts" about long depreciated (obsolete) versions of this armature tool for making inferior portals.
Re:Problem. (Score:2)
Oh..and you forgot to add Python to your list. Probably a better candidate than Ruby at the moment because of the availability of tools.
Re:Problem. (Score:2)
Oh, I don't know. Ruby has a decent number of tools available. There's mod_ruby [modruby.net] and a bunch of templating/web application libraries like Amrita [brain-tokyo.jp] and Cerise [rubyforge.org].
Re:Problem. (Score:2)
Re:Problem. (Score:4, Funny)
"Yes, that's hard but you must admit that I have a point."
Everything about this is calculated to piss off the Slashdot reader--the overt arrogance (Mensa membership!?? Are you kidding!??), the attempt to seem like an authority on the subject by making overly specific assertions, even down to the bad punctuation! On top of that, he starts throwing down about PHP and Perl--yeah, when I want to make a well-reasoned argument, the first thing I do is start flaming a religious OSS obsession. Good strategy.
Now, I don't want to be too judgemental, because I can get pretty snippy myself (it's good to blow off steam by smacking someone around), but I think this goes further--it's a calculated attempt to piss people off for the purpose of pissing people off.
His argument doesn't even make any sense--the *right* tools for a job, ANY job, are the tools that fit that particular job. For small, non-scaling apps that need quick and easy-to-maintain/modify structures, PHP/Perl and Apache work wonderfully. Why the fuck should anyone start fucking around with Corba for building a web forum? Especially when the skills to work in PHP are much more common, and therefore cheaper?
I'm not trying to point out that he's wrong--I'm just trying to show how totally ungrounded the post is.
I've seen this account do this before--not always, so maybe it's not a straight-up troll account--but he IS just being an asshole.
Re:Problem. (Score:1)
Then explain to me why we rolled out a PHP solution to a major corporation's web problems in 6 weeks that was faster, more flexible, and closer to their design specifications than the as-yet-unfinished "enterprise-capable" .NET solution they've had dozens of "professional" programmers working on for 24 months? And we didn't use the OOP portions of PHP to do it... except for some readily-available classes we used for email and XML integration.
As another post st
Re:Problem. (Score:2)
All that object "orientated" (east facing objects?) languages do is to try to enforce OO principles. There is no reason that you can't design OO into languages like perl, or c. If fact I'm giving a talk on object oriented design in C later this month at my employer.
Now it's hard/combersome to do stuff like inheritance, reflection and access modifiers, but encapsulating data with its associated methods and a lot of discipline will get you
To be fair (Score:2)
Note: when bragging about your intelligence in an adopted language, it pays to actually be adept with that language... otherwise, whether you intend to or not, you'll provide amusement and provoke snide comments from the native speakers.
Perhaps the
great book (Score:1, Redundant)
Re:great book (Score:3, Informative)
Exhibit A: The customer review section [amazon.com] from Amazon. Note that the first review matches the above review.
Exhibit B: The first plagiarization post [slashdot.org] in this thread. Note how it is eerily similar to the second customer review in the Amazon page.
Exhibit C: relrelrel's comment [slashdot.org] (as an Anonymous Coward) complaining about the first time I pointed out his plagiarization. But if it truly
OT: httpd.conf question (Score:2)
Re:OT: httpd.conf question (Score:1)
Link is for 2.0 documentation.
Very powerful.
Re:OT: httpd.conf question (Score:1)
I made a seperate VirtualHost entry with a redirect.
ServerName mail.foo.bar
Redirect / https://www.foo.bar/horde/imp
header redirect (Score:2)
To solve your problem with PHP, create an index.php file that contains this:
?php header ("Location: http://www.foo.bar/horde/imp/login.php'); ?
Re:OT: httpd.conf question (Score:2)
Crap (Score:4, Funny)
Re:Crap (Score:1)
Re:Crap (Score:1)
There's a difference, you know.
Re:Crap (Score:1)
Re:Crap (Score:1)
I was merely commenting on the ambiguity of the phrase "Apache Cookbook". Because, you see, you can have a "Mexican Cookbook". But you can also have a "Dessert Cookbook". Get it?? Is it funny now that I explained it? Wheeeeeeee, everybody laugh now!!
Re:Crap (Score:2)
(yes, I know it really isn't if you read the book rather than just watch the movie)
Re:Crap (Score:1)
Anyways (yes, I know you were joking) I'm currently reading "Chasing Shadows", which is about the Apache people during the late 1800s and early 1900s, and I *highly* recommend it as a way to learn about the Apache people
Re:Crap (Score:1)
typing on crack cuz I'm at work
Re:Crap (Score:1)
Re:Crap (Score:2)
Good thing with apache (Score:3, Insightful)
mod_rewrite (Score:3, Funny)
You must not do much with sendmail....
More info on the book's site (Score:1)
the review didn't mention it afaics, and neither does o'reilly, but we have a companion site for this book: Apache-Cookbook.Com [apache-cookbook.com]. that's where we keep the up-to-date errata, the table of contents, and a random recipe-of-the-day. (and soon reviews and review pointers.)
just fwiw.
Re:ENEMY OF THE INTERWEB! (Score:1)
"rhonda@training.edu.cx [mailto] doesn't bounce. >:) I asked simply "Are you the person that had goatse.cx shut down?" I think a lack of a reply will be suspicious.