server {
    listen 80;
    server_name _;
    root /srv/share/public;

    client_max_body_size 512M;

    location / {
        try_files $uri /index.php$is_args$args;
    }

    # PROD
    location ~ ^/index\.php(/|$) {
        fastcgi_pass localhost:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;
        fastcgi_read_timeout 300;
        internal;
    }

    location ~ \.php$ {
      return 404;
    }

    error_log /proc/self/fd/2;
    access_log /var/log/nginx/app_access.log;
}
