| server {
    listen 80;
    root /app/public;
    index index.php index.htm index.html;
    #location / {
     #   try_files $uri $uri/ /index.php?$query_string;
    #}
    location / {
        index index.php;
        # This is cool because no php is touched for static content
        try_files $uri $uri/ @rewrite;
            expires max;
    }
    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?_route=$1;
      }
    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_connect_timeout 10s;
        fastcgi_read_timeout 10s;
        fastcgi_buffers 256 4k;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass php:9000;
    }
}
 |