Welcome! Log In Create A New Profile

Advanced

nginx, nginx-passenger, and a nested wordpress ...

October 03, 2009 09:49PM
so, for sinatra (ruby) sites running with nginx-passenger i'm using something basic like:

server {
listen 80;
server_name .<site.com>;

root /www/<site.com>/public;

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

passenger_enabled on;
}

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

server {
listen 80;
server_name .<site.com>;
access_log /www/public_html/<site.com>/log/access.log;
error_log /www/public_html/<site.com>/log/error.log;
location / {
root /www/public_html/<site.com>/public/;
index index.php index.html;
include /opt/nginx/conf/wordpress_params.super_cache;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /opt/nginx/conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /www/public_html/<site.com>/public/$fastcgi_script_name;
}
}

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

http://railsdog.com/blog/2009/06/using-rack-to-combine-sinatra-and-word-press/

where they use the block:

<Location /blog>
PassengerEnabled off
</Location>

... 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!

grantmichaels
Subject Author Posted

nginx, nginx-passenger, and a nested wordpress ...

grantmichaels October 03, 2009 09:49PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 132
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready