I started using Nginx as my primary web server a little over 18 months ago. At the time, I was using an underpowered server with low memory, and I wanted to replace Apache with something lighter. Even though I still love Apache for its power, configurability, and contributions to the open source world, there are times when other options are called for.
Nginx is an http server written in Russia intended for high traffic websites with a mind toward network scalability. It also works great as a lightweight replacement for Apache on my little server with 256MB RAM and one processor (that has since been upgraded, but I didn’t switch back). Even the day I had a post on the front page of of a popular social networking website, my little server withstood the onslaught without crashing.
The hard part of making the switch was finding documentation. As Nginx was birthed in Russia, I presume good documentation may be found in Russian, but since I don’t know the language that doesn’t help me. Finding documentation in English was a chore. Simple things were available at the main Nginx website and wiki (which have also grown and improved over time), but I had a difficult time finding detailed information about specific things I needed, such as translating Apache 301 rewrite rules into a format that would work in Nginx so that I could continue to use WordPress with pretty URLs.
Nginx HTTP Server is the first English book I have seen that compiles quality documentation and instruction for using Nginx. The information is current, detailed, and clear.
Some of the topics in the book seem to me to be a bit odd. There is a whole chapter dedicated to basic Linux shell commands and administration. Perhaps this will be useful for some, but I would imagine most people interested in Nginx will already know the topic. The second chapter discusses downloading source code, configuring, and installing the traditional way along with writing up a SysV init script for the service. I think that is good information to include. Strangely missing is information about installing Nginx from Linux distribution repositories, which is far easier, especially for the presumed newbies who needed the first chapter on shell commands.
The real value of this book is in chapters 3 – 8. Here we dive deep into configuration options, file syntax, modules, variables and more. We learn how to set up PHP and Python with Nginx, which will make hosting most popular website software like WordPress, vBulletin, or anything built with Django fairly simple. Also discussed are similar methods of enabling other languages and platforms like Perl or Ruby on Rails.
The last two chapters are great for people coming over from Apache. One discusses how to use Nginx as a front end proxy to speed up a website running Apache. The other discusses how to make a full switch. Both include great comparisons and honest discussions of the strengths and differences between Apache and Nginx, including some good advice about when one may be a better choice than the other.
I have a lot of good things to say about this book, and I’m glad it exists. It will remain on my shelf as a useful reference for specific modules and configuration details that are not committed to memory. Comparing its contents to what I already know of Nginx, I believe the book to be technically accurate and current.
The book does have one glaring weakness, though. The quality of the writing is inconsistent. Most of the time, the text is adequately clear and communicates well. However, there is an annoying tendency throughout the book toward awkward grammar and odd phrasing, perhaps as often as one occurrence every two or three pages. This tells me two things: the book was probably written by someone who is not a native English speaker, which is not a big deal at all, and that the copy editing and proofreading was weak, which is a major failing. The initial cringe-worthy portion occurs in the very first paragraph of the Preface:
…for the past few month the same reports reveal the rise of a new competitor: Nginx, a lightweight HTTP server originating from Russia–pronounced “engine X”. There have been many interrogations surrounding the pronounced newborn. Why has the blogosphere become so effervescent about it?
Packt Publishing generally releases books on technology that are current and contain accurate information. The company focuses their efforts on very narrow, niche topics that they alone offer, and I like that. They also have a disappointing habit of being filled with this sort of writing. This book is no exception. Since, like many of their offerings, this is the only book on a topic that is interesting and useful to a specific group of people, I can’t help but recommend that people using or wanting to use Nginx take a look at the book. Still, I would love to see the language of their books rise to the level of their technical content. This would allow me a clearer conscience in recommending their products.
Disclosures: I was given my copy of Nginx HTTP Server free by Packt Publishing as a review copy. I am also a professional writer for a software project and have written for magazines, websites, and books for both O’Reilly Media and Pearson Education (both Prentice-Hall and Sams).
I have been asked by the guys at PACKT to review a book too – OpenX Ad Server: Beginner’s Guide – and I have noticed exactly the same thing: horrible phrasing, grammar and spelling. It’s not surprising coming to think that all the editors – and in the case of the book I wrote the review for the author and the official reviewers – were all non-native speakers. Even so, at least the spelling should have been okay: we all have spell checkers now…
It’s a pity that they don’t put more effort into publishing these books at a more professional level because some of the topics are really interesting. But I guess that’s why Apress, O’Reilly and Pearson are the market leaders…