Try a small self-contained test case to reproduce the "net::ERR_CONNECTION_CLOSED 200 (OK)" error.

The test suit consists of 4 files (conveniently created for me by an LLM):
1. index.php
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Phase 3 – Minimal Astra Failure Reproduction</title>
<!-- These two CSS bundles alone should trigger ERR_CONNECTION_RESET -->
<link rel="stylesheet" href="css-bundle.php?size=300&cb=1">
<link rel="stylesheet" href="css-bundle.php?size=300&cb=2">
</head>
<body>
<h1>Phase 3 – Minimal Test</h1>
<p>If Altervista resets connections, it will happen immediately on page load.</p>
<!-- This JS bundle is the main trigger (Astra-like minified JS) -->
<script src="big-bundle.php?size=3400&cb=1"></script>
</body>
</html>
2. big-bundle.php. This is the Astra‑like minified JS generator.
Code:
<?php
@set_time_limit(0);
$size_kb = intval($_GET['size'] ?? 3400);
$bytes_target = $size_kb * 1024;
@ini_set('output_buffering', 'off');
@ini_set('zlib.output_compression', 0);
while (ob_get_level()) { ob_end_clean(); }
header("Content-Type: application/javascript");
header("Cache-Control: no-cache, no-store, must-revalidate");
$chunk = '';
for ($i = 0; $i < 150; $i++) {
$chunk .= "!(function(a,b){try{var c='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',d='"
. bin2hex(random_bytes(16))
. "',e={k1:'v',k2:{nested:true,id:" . rand(1,9999) . "}};console.log(a,b,c,d,e);}catch(f){}})('"
. bin2hex(random_bytes(12))
. "'," . rand(1,999999) . ");";
}
$chunk_len = strlen($chunk);
$bytes_sent = 0;
while ($bytes_sent < $bytes_target) {
$remaining = $bytes_target - $bytes_sent;
$to_send = ($remaining >= $chunk_len) ? $chunk_len : $remaining;
echo substr($chunk, 0, $to_send);
$bytes_sent += $to_send;
flush();
if (connection_aborted()) exit;
}
exit;
3. css-bundle.php
Code:
<?php
@set_time_limit(15);
$size_kb = intval($_GET['size'] ?? 300);
$bytes_target = $size_kb * 1024;
header("Content-Type: text/css");
header("Cache-Control: no-cache, no-store, must-revalidate");
$chunk = '';
for ($i = 0; $i < 400; $i++) {
$class = 'c' . bin2hex(random_bytes(3));
$chunk .= ".{$class}{color:#" . bin2hex(random_bytes(3)) . ";background:#" . bin2hex(random_bytes(3)) . ";padding:" . rand(0,50) . "px;margin:" . rand(0,50) . "px;border-radius:" . rand(0,25) . "px;}\n";
}
$chunk_len = strlen($chunk);
$bytes_sent = 0;
while ($bytes_sent < $bytes_target) {
$remaining = $bytes_target - $bytes_sent;
$to_send = ($remaining >= $chunk_len) ? $chunk_len : $remaining;
echo substr($chunk, 0, $to_send);
$bytes_sent += $to_send;
flush();
if (connection_aborted()) exit;
}
exit;
4. .htaccess
Code:
# Increase limits
<IfModule mod_substitute.c>
SubstituteMaxLineLength 10M
</IfModule>
# Disable gzip to ensure we see the raw TCP stream failure. Disable gzip so we see raw truncation
<IfModule mod_env.c>
SetEnv no-gzip 1
</IfModule>
# Disable buffering if possible
<IfModule mod_php.c>
php_flag output_buffering Off
</IfModule>
Place in one folder and point browser to index.php. Watch ERR_CONNECTION_CLOSED errors in Chrome Inspector > Console.