apiVersion: v1
kind: ConfigMap
metadata:
    name: nginx-conf
data:
    default.conf: |
        proxy_connect_timeout       600s;
        proxy_send_timeout          600s;
        proxy_read_timeout          600s;
        send_timeout                600s;

        server {
            root /usr/share/nginx/html;

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

            location ~ ^/index\.php(/|$) {
                fastcgi_pass localhost:9000;
                fastcgi_split_path_info ^(.+\.php)(/.*)$;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME /app/public/index.php;
                fastcgi_param DOCUMENT_ROOT /app/public;
                
                fastcgi_connect_timeout 600s;
                fastcgi_read_timeout 600s;
                fastcgi_send_timeout 600s;
                
                internal;
            }

            location ~ \.php$ {
                return 404;
            }
        }
