Website on Plesk server suddenly started to show 500 error

 

How to Fix a WordPress 500 Internal Server Error

Symptoms

  • The website suddenly started to show 500 errors:

    AH10292: Invalid proxy UDS filename (proxy:unix:///var/www/vhosts/system/example.com/php-fpm.sock|fcgi://127.0.0.1:9000/var/www/vhosts/example.com/httpdocs/public/index.php)

  • Apache has been updated recently to a new version:Ubuntu 20.04:

    grep ‘status installed’ /var/log/dpkg.log | grep apache2:amd64
    2021-09-27 12:46:57 status installed apache2:amd64 2.4.41-4ubuntu3.5

    Ubuntu 18.04:

    grep ‘status installed’ /var/log/dpkg.log | grep apache2:amd64
    2021-09-28 06:25:55 status installed apache2:amd64 2.4.29-1ubuntu4.17

Cause

The issue is related to the latest Apache update, which changed the approach in handling UDS URIs used to proxy connections from Apache to PHP-FPM.

Resolution

The Plesk development team is aware of the issue and works on fixing the issue from the Plesk side.

Please “follow” this article to get notified about further instructions about the Apache update. Meanwhile, please apply the following workaround.

For Ubuntu 20.04
  1. Connect to the server using SSH.
  2. Change to superuser:

    sudo su –

  3. Downgrade Apache to previous version:

    export version=”2.4.41-4ubuntu3″; apt-get install apache2=$version apache2-utils=$version apache2-data=$version apache2-bin=$version

  4. Set to “hold” package for updates:

    apt-mark hold apache2

For Ubuntu 18.04
  1. Connect to the server using SSH.
  2. Change to superuser:

    sudo su –

  3. Downgrade Apache to previous version:

    export version=”2.4.29-1ubuntu4″; apt-get install apache2=$version apache2-utils=$version apache2-data=$version apache2-bin=$version

  4. Set to “hold” package for updates:

    apt-mark hold apache2