Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

laracoft's avatar
Level 27

Missing /var/run/php-fpm.sock after reboot

  1. I'm on ubuntu 22.04
  2. On A, I have scripted my server installation to install PHP (8.4.21), MySQL and Apache
  3. On B, I have scripted my server installation to install PHP (8.4.21), MySQL and Nginx
  4. For B, when re-running the script on a fresh machine recently, /var/run/php-fpm.sock is now missing and causing the Laravel site not to load in the browser
  5. The script of A remains problem free
  6. Has anyone faced the same issue and found a solution? I suspect it is in Nginx
0 likes
4 replies
JussiMannisto's avatar

Start the php-fpm service:

sudo systemctl start php-fpm

Then enable it so it starts automatically on boot:

sudo systemctl enable php-fpm

This is assuming the service is named php-fpm in your system, which it probably is if the socket file was named php-fpm.sock before you rebooted. Often the service is versioned instead, e.g. php8.4-fpm.

laracoft's avatar
Level 27

There is no such service as php-fpm, this problem started after 17th Apr 2026... probably in May 2026.

JussiMannisto's avatar

If you had this file before the reboot:

/var/run/php-fpm.sock

Then you definitely had php-fpm running earlier.

You need php-fpm to run a Laravel app – or any PHP app for that matter – through Nginx. There are alternatives, but php-fpm is by far the most popular choice.

As I mentioned, the service may have a different name, such as php8.4-fpm. You can look for it:

systemctl list-unit-files | grep php

If you updated PHP and accidentally uninstalled php-fpm, you need to reinstall it.

laracoft's avatar
Level 27

You keep telling me how things should be, sure, but I already know that

I'm telling you how things are right now, so the big question is have you actually tried to install Nginx vs Apache on 22.04 after my OP?

Please or to participate in this conversation.