Question

nginx fpm.sock error

Posted December 7, 2020 719 views
NginxLaravelUbuntu 20.04

I have run into several errors with a site (but solely when accessed by Internet Explorer it seems. Here is the following Nginx error log:


2020/12/07 13:45:06 [error] 192900#192900: *9588 access forbidden by rule, client: 91.241.19.84, server: XXX, request: "POST /mifs/.;/services/LogService HTTP/1.1", host: "XXX", referrer: "https://XXX>
</Util/PHP/eval-stdin.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "XXX"
2020/12/07 13:45:12 [error] 192900#192900: *9596 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 91.241.19.84, server: XXX, request: "POST /vendor/phpunit/phpunit/src/Util/>
<Util/PHP/eval-stdin.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "XXX"

2020/12/07 13:45:14 [error] 192900#192900: *9599 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 91.241.19.84, server: XXX, request: "GET /vendor/phpunit/phpunit/src/Util/P<Util/PHP/eval-stdin.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "XXX"

2020/12/07 13:47:36 [error] 192900#192900: *9606 access forbidden by rule, client: 193.169.252.34, server: XXX, request: "GET /.env HTTP/1.1", host: "XXX", referrer: "https://www.google.com/"


I’m running Ubuntu 20.04. I’d appreciate any and all help, I’ve never had an issue like this before and I’m stuck as to where to begin.

Thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hi there @aaAnemone,

It looks like PHP FPM is not running. You can check that with the following command:

  • sudo systemctl status php7.4-fpm.service

If this is the case you can start it with the following command:

  • sudo systemctl start php7.4-fpm.service

Let me know how it goes!
Regards,
Bobby

Hi,

If the errors are related just to IE, look for a directive blocking $http_user_agent in nginx configuration, especially in location ~ \.php$