Running simpletest tests with clean urls on nginx
You should rewrite Drupal 7 URLs using  rewrite ^ /index.php last;. The more complete setup is (copied from my development setup):

server {
  listen 80;
  listen [::]:80;

  root [...];
  index index.php;
  server_name [...];

  location = /favicon.ico {
    log_not_found off;
    access_log off;
  }

  location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
  }

  # Deny all attempts to access hidden files
  location ~ /\. {
    deny all;
    access_log off;
    log_not_found off;
  }

  location / {
    try_files $uri $uri/ @rewrite;
  }

  location @rewrite {
    # Some modules enforce no slash (/) at the end of the URL
    # Else this rewrite block wouldn't be needed (GlobalRedirect)
    rewrite ^ /index.php last;
  }

  # pass the PHP scripts to FastCGI server listening on my unix socket
  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_intercept_errors on;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 256 16k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_read_timeout 1200;
    # With php5-fpm:
    fastcgi_pass unix:/var/run/php5-fpm.sock;
  }

  client_max_body_size 100M;

  location ~ ^/sites/.*/files/styles/ {
    try_files $uri @rewrite;
  }

  location ~* \.(js|css|png|jpg|jpeg|gif|ico|woff|ttf|svg|eot)$ {
    expires max;
    log_not_found off;
  }
}