I have a project (www.xxx.com) running under nginx. In this project, I need point a subdirectory (www.xxx.com/blog) to a blog with Wordpress in other domain too under a folder (www.yyy.com/blog) under the Apache.

I changed my WP to run with permalinks and didn't configure the .htaccess. I made it on nginx with the following code:

```
location /blog {
 try_files $uri $uri/ /blog/index.php?q=$request_uri;
 proxy_pass http://static.gri.fo/blog;
}

```

It makes a 500 Internal Server Error nginx/1.4.6 (Ubuntu)

In the log it returns:

2015/08/31 13:19:39 [error] 7565#0: \*1 rewrite or internal redirection cycle while internally redirecting to "/blog/index.php", client: 179.219.42.26, server: www.xxx.com.br, request: "GET /blog/ HTTP/1.1", host: "www.xxx.com.br"

Any idea to solve it?