try_files $uri $uri/ /index.php/$uri; Ref: http://blog.martinfjordvald.com/2011/02/nginx-primer-2-from-apache-to-nginx/