-
Website
http://www.opticality.com/blog/ -
Original page
http://www.opticality.com/blog/2008/06/09/nginx-reporting-for-duty/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
andrewrk
2 comments · 1 points
-
alandb
13 comments · 1 points
-
hadar
251 comments · 3 points
-
chrisabraham
2 comments · 1 points
-
thingles
20 comments · 1 points
-
-
Popular Threads
-
ambeR Rubarth at NAU NYC
1 day ago · 2 comments
-
Ian Axel and Greg Holden at Canal Room
5 days ago · 7 comments
-
New Thanksgiving Tradition
2 weeks ago · 6 comments
-
Droid Rocks
1 week ago · 1 comment
-
ambeR Rubarth at NAU NYC
It seems that you just should not use if()s in nginx.conf for such kind of things, it is rather slow and not intended for request-uri case handling; it is supposed to be used in specific cases like user-agent checks etc.
use regexp locations instead.
to avoid copy-pasting, put some directives to the server{} level, or use the include directive.
I'm going to get a RoR app setup via nginx as well. Seems really slick to have nginx on front with PHP-FPM and Mongrel.
The thing that confuses me the most about nginx is how to handle wordpress nice URL's. I saw lots of fright from people about the lack of mod_rewrite. You seem okay though, yes?
As for mod_rewrite, it's actually a one-liner in nginx. Basically, if the URI doesn't exist on the filesystem (that's the part I screwed up initially, entirely my fault!), then you simply pass it as a parameter to index.php in the blog root.
Works like a charm, no matter what the permalink structure on your site. It's beautifully simple. :-)