Skip to content

Premature end of script headers: index.php

I am using Apache2 and Php8.2-fpm to serve Magento 2.4.7. When I try to access the site I get this error message in Apache logs:

[proxy_fcgi:error] [pid 168766:tid 168775] [client 127.0.0.1:46104] Premature end of script headers: index.php

[proxy_fcgi:error] [pid 168766:tid 168775] [client 127.0.0.1:46104] AH01070: Error parsing script headers

[proxy_fcgi:error] [pid 168766:tid 168775] (22)Invalid argument: [client 127.0.0.1:46104] AH01075: Error dispatching request to :

Has anyone had this problem, and how can it be solved?