Nginx, nginx-passenger, and a nested wordpress

so, for sinatra (ruby) sites running with nginx-passenger i’m using
something basic like:

server {
listen 80;
server_name .;

root /www//public;

location ~* \.(ico|css|js|gif|jp?g|png)(\?[0-9]+)?$ {
expires max;

passenger_enabled on;


and for a normal Wordpress site I’m using something like:

server {
listen 80;
server_name .;
access_log /www/public_html//log/access.log;
error_log /www/public_html//log/error.log;
location / {
root /www/public_html//public/;
index index.php index.html;
location ~ .php$ {
fastcgi_index index.php;
include /opt/nginx/conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME

and I’m out to experiment within wrapping Wordpress within Sinatra/Rack
a la this example using Apache:

where they use the block:

PassengerEnabled off

… to exclude the blog that’s located in a sub-directory under /public
from being handled by Passenger …

I’ve gotten myself confused as to how to modify my aforementioned
Sinatra server block to have a second location (like, “location /wp”)
besides the “location /” block where I can use the “passenger_enabled
off;” directive …

any help is appreciated!


Posted at Nginx Forum: