Version 8 URL Rewrite Issue on Nginx

Permalink
Hi,

I'm running the new version 8 of concrete5 on Nginx and I have troubles getting the SEO urls and especially the URL rewriting to work. I copied the configuration that concrete gave me (listed below)

location / {
set $do_rewrite 1;
if (-f $request_filename) {
set $do_rewrite 0;
}
if (-f $request_filename/index.html) {
set $do_rewrite 0;
}
if (-f $request_filename/index.php) {
set $do_rewrite 0;
}
if ($do_rewrite = "1") {
rewrite ^/(.*)$ /index.php/$1 last;
}
}

to the sites configuration file. It works when I open the home page, but when I try to visit e.g. /login it gives me HTTP status 500. When I look at the Nginx logs, it gives me this error message

rewrite or internal redirection cycle while processing "/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/fpm-status

So I am having a redirection loop. Any ideas how to fix this?

Thanks!