reconnect PHP to apache so I don't get 503 server errors each time I run a PHP script.

mik3ca

Verified User
Joined
May 31, 2026
Messages
14
I'm trying to regenerate my PHP-FPM sock files to connect with apache (unix sockets) to try to make things work but I am not successful.
I tried restarting php-fpm, restarting httpd but the only way I could be successful temporarily is by modifying the apache virtual host configuration files by hand to match the filenames when calling the sockets.

I also tried reinstalling all PHP versions and still no luck.
Do I also have to reinstall apache or is there some directadmin script I could run where apache can automatically reference the right PHP-FPM sock files (so I don't get 503 server errors)
 
Hello,

I'm not quite sure I get what you do and what you already did. By default directadmin manages all the things including paths to PHP-FPM sockets and their names. If for any reason virtual hosts in your setup have wrong socket names and/or paths, it might mean either you customized a specific virtual host or have custom templates for services. And you might need to remove the custom things.

So again one issue might come out of another you've already reported here.

If you reinstall PHP-FPM and Apache, you don't reset custom templates and custom instructions added in DirectAdmin for a specific domain/user.
 
Back
Top