events {
  worker_connections  2048;
}

http {
    include    mime.types;
    sendfile on;
    server {
        listen 80;
        index index.php index.html;
        root /var/www/html;
        client_max_body_size 10M;

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

        location ~ \.css {
            add_header Content-Type text/css;
        }

        location ~ \.js {
            add_header Content-Type application/x-javascript;
        }

        location ~ ^/(assets/|css/|js/|/index.html) {
            root /var/www/html/public;
            index index.html;
            access_log off;
        }

        location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass jasper-kelola:9000;
            fastcgi_index index.php;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            fastcgi_read_timeout 1800;
        }
    }
}
