worker_processes auto;

error_log stderr;
pid /var/run/nginx.pid;

events {
  worker_connections 1024;
}

http {
  include /etc/nginx/mime.types;
  access_log /dev/stdout;
  server_tokens off;

  server {
        listen $PORT;

        root /app/web;

        location / {
            index index.php index.html index.htm;
        }

        location ~ \.php$ {
          try_files $uri =404;
          fastcgi_split_path_info ^(.+?\.php)(/.*)$;
          fastcgi_pass 127.0.0.1:9000;
          fastcgi_index index.php;
          include /etc/nginx/fastcgi_params;
          fastcgi_param SCRIPT_FILENAME /app/web/$fastcgi_script_name;
          fastcgi_param PATH_INFO $fastcgi_path_info;
        }
    }
}
