Run elgg with nignx

Before install, add lines in your server config:

location / {
            try_files $uri $uri/ /index.php?q=$uri&$args;  
        }

After installed, change the line:

try_files $uri $uri/ /index.php?q=$uri&$args;  

to:

try_files $uri $uri/ /index.php?__elgg_uri=$uri&$args; 

 

Any better solutions?Let me knwo.