AH01071: Got error 'Primary script unknown'
I see this error from time to time on one of my domains. Anyone know what it is and means?
[Tue Nov 08 12:16:50.622437 2022] [proxy_fcgi:error] [pid 76142] [client 22.214.171.124:63939] AH01071: Got error 'Primary script unknown'
jhartman Linode Staff
Though I've never personally encountered this one, I found some discussion about this issue on various Linux forums:
- Contribution - Using the Apache Alias directive with PHP-FPM served by Apache | Plesk Forum
- AH01071: Got error ‘Primary script unknown\n’ – Server Administration – vpsfix.com Forum
As far as I understand, php is attempting to connect to a file it cannot locate or does not have permission to access. Aside from updating your permissions, many people have reported that restarting Apache2 and PHP-FPM will also solve the issue.
(sudo) systemctl restart apache2 (sudo) systemctl restart php-fpm$VERISION
You can check your PHP version by running the command
php --version and then substitute that version number for $VERSION (example 7.4, 8.1, etc).