I\'m trying to serve request to /blog subdirectory of a site with the php code, located in a folder outside document root directory. Here\'s my host config:
This is a long standing bug in nginx. But you can work around by using the root directive again. Kind of a hack, but at least it works.
server {
index index.php;
root /home/alex/www/test2;
server_name local.test.ru;
location /blog {
root /home/alex/www/test1;
try_files $uri $uri/ /blog$is_args$args;
}
}