access_log /dev/stdout main;
error_log /dev/stderr;


server {
    listen 80;

    server_tokens off;

    index index.php index.html index.htm;

    root /var/www/html/public;

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

    location ~ ^/index\.php(/|$) {
        fastcgi_pass php:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_send_timeout 600s;
        fastcgi_read_timeout 600s;
        fastcgi_connect_timeout 600s;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $document_root;
        internal;
        fastcgi_param HTTPS on;
        fastcgi_param HTTP_X_FORWARDED_PROTO https;
    }

    location ~ \.php$ {
        return 404;
    }

}