Elgg 1.8.3 with nginx what are the rewrite rules?

Hello!

I'm trying to setup a Elgg server with nginx + php fpm. Everything seems to work but I can't pass the installation. I get stuck at the start with the error: 

Web server

  • We think your server is running the Nginx web server.

    The rewrite rules test failed. You need to configure your web server with Elgg's rewrite rules and try again.

I tried the rewrite rules suggested in: http://community.elgg.org/pg/forum/topic/721005/elgg-blog-elgg-18-beta1-released/ 

And: http://docs.elgg.org/wiki/Elgg_and_nginx

But it didn't work out. Any ideas? 

My current site config: 

 
	location ~ ^/cache/ {
		rewrite ^/cache\/(.*)$ /engine/handlers/cache_handler.php?request=$1&$args;
	}
	location ~* ^/pg/(css|js) {
		rewrite ^/pg\/([A-Za-z0-9\_\-]+)$ /engine/handlers/page_handler.php?handler=$1&$args;
		rewrite ^/pg\/([A-Za-z0-9\_\-]+)\/(.*)$ /engine/handlers/page_handler.php?handler=$1&page=$2&$args;
	}
	# For all other requests, try the file, or rewrite if it's PHP
		location / {
		try_files $uri $uri/ @rewrite;
	}

	location @rewrite {
		rewrite rewrite\.php$ install.php last;

		rewrite ^/tag\/(.+)\/?$ /engine/handlers/page_handler.php?handler=search&page=$1;
		rewrite ^/action\/([A-Za-z0-9\_\-\/]+)$ /engine/handlers/action_handler.php?action=$1&$args;

		rewrite ^/services\/api\/([A-Za-z0-9\_\-]+)\/(.*)$ /engine/handlers/service_handler.php?handler=$1&request=$2&$args;
		rewrite ^/export\/([A-Za-z]+)\/([0-9]+)\/?$ /engine/handlers/export_handler.php?view=$1&guid=$2;
		rewrite ^/export\/([A-Za-z]+)\/([0-9]+)\/([A-Za-z]+)\/([A-Za-z0-9\_]+)\/$ /engine/handlers/export_handler.php?view=$1&guid=$2&type=$3&idname=$4;
		rewrite /xml-rpc.php /engine/handlers/xml-rpc_handler.php;
		rewrite /mt/mt-xmlrpc.cgi /engine/handlers/xml-rpc_handler.php;
		rewrite ^/rewrite.php$ /install.php;
		
		if (!-d $request_filename){
			set $rule_11 1$rule_11;
		}
		if (!-f $request_filename){
			set $rule_11 2$rule_11;
		}
		if ($rule_11 = "21"){
			rewrite ^/([A-Za-z0-9\_\-]+)$ /engine/handlers/page_handler.php?handler=$1;
		}
		if (!-d $request_filename){
			set $rule_12 1$rule_12;
		}
		if (!-f $request_filename){
			set $rule_12 2$rule_12;
		}
		if ($rule_12 = "21"){
			rewrite ^/([A-Za-z0-9\_\-]+)\/(.*)$ /engine/handlers/page_handler.php?handler=$1&page=$2;
		}

	}
Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking