Website on Plesk server suddenly started to show 500 error: AH10292: Invalid proxy UDS filename

Follow

Comments

318 comments

  • Avatar
    Sami Radi

    Hello,

    The problem is located in the vhost in the generated

    /var/www/vhosts/system/httpd.conf 

    file, in the Apache2 to PHP-FPM proxy configuration directive.

    The generated configuration is :

    <IfModule mod_proxy_fcgi.c>
    <Files ~ (\.php$)>
    SetHandler proxy:unix:///var/www/vhosts/system/your-domain.tld/php-fpm.sock|fcgi://127.0.0.1:9000
    </Files>
    </IfModule>

    It should be according to https://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html :

    <IfModule mod_proxy_fcgi.c>
    <Files ~ (\.php$)>
    SetHandler proxy:unix:/var/www/vhosts/system/your-domain.tld/php-fpm.sock|fcgi://127.0.0.1:9000
    </Files>
    </IfModule>

    /// should be one /

    FIX (works on my plesk server) : 

    In Virtual Host Apache2 Additional directives for HTTP OR Additional directives for HTTPS (depends on which you are using), add the following directive :

    <Directory /var/www/vhosts/your-domain.tld/httpdocs/webroot>
    <IfModule mod_proxy_fcgi.c>
    <Files ~ (\.php$)>
    SetHandler proxy:unix:/var/www/vhosts/system/your-domain.tld/php-fpm.sock|fcgi://127.0.0.1:9000
    </Files>
    </IfModule>
    </Directory>

    Don't forget to replace your-domain.tld with your own domain vhost.

    I hope plesk will fix this issue in their next upgrade.

    Best regards,

    0
    Comment actions Permalink
  • Avatar
    Nipuna Maduranga (Edited )

    @Fitz Im currently not aware about that though. Sometimes it could, if you have any conflicting plugins or other scripts, but agian i've not tried that, Try contacting plesk support team about that. but, i hope you have a site backup in hand if anything goes wrong.

    If you dont have a backup, i highly recommend you keep at least weekly backups of your sites. You can try updraft plus and schedule automatic backups for your google drive for free :)

    Cheers :)

    0
    Comment actions Permalink
  • Avatar
    Fitz

    @TechTheBoy  Thanks so much for all your help today! i will take your advice and contact Plesk support with this question.

    Take great care until i need you again :)

    Fitz

    0
    Comment actions Permalink
  • Avatar
    Nipuna Maduranga

    @Fitz Okay cool bro, have a great day ahead and stay safe :)

    0
    Comment actions Permalink
  • Avatar
    Tony

    thanks for the quick fix. had two servers go down this morning due to this.

    0
    Comment actions Permalink
  • Avatar
    elvisn

    It works for me ... thanks

    1
    Comment actions Permalink
  • Avatar
    LaGTeK (Edited )

    Thanks a lot you saved my 2 servers with that quick fix ! Thank you Plesk support.

    0
    Comment actions Permalink
  • Avatar
    Joe Guster

    Thanks for this article. It was a lifesaver after I woke up to some alerts.

    0
    Comment actions Permalink
  • Avatar
    Benjamin

    https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1945311

    Canonical shall release a new Apache2 package today which fixes the bugs permanently.

    4
    Comment actions Permalink
  • Avatar
    Manuel Wiesert

    Gibt esd nun schon eine dauerlösung ?? oder ist da noch kein neues Update raus ? 

    0
    Comment actions Permalink
  • Avatar
    Conor

    Is there a way to setup email alerts for when errors like this occur on the server? Like an email for each entry in the error logs?

    0
    Comment actions Permalink
  • Avatar
    Benjamin

    This cannot be emphasised enough:

    but issues like this must be prevented in first place, It seems that Plesk does not have a staging environment to test upgraded packages from distro in first place.

    Such a light-minded attitude from a professional vendor?

    A breaking bug like this is serious and I hope to see Plesk coming up with a statement regarding this and how they will make sure to prevent this in the future.

    It has nothing to do with Plesk. Plesk doesn't ship the webserver. It uses the OS repository to install the webservers.

    I didn't really check the code changes that Apache did, but they did changes to prevent security issues which breaks certain configurations. If it all, it's Apaches fault for not testing their code changes enough but then again, who knows how common the configuration that Plesk uses is. It affects certainly a lot of users via Plesk but how many Apache users does it affect without Plesk?

    The breaking change was introduced on Sep 8th and the fix was introduced on Sep 22nd. Also it seems the issue was never made an official issue with Apache, so other people were not aware of this change being a breaking change.

    So it some point inbetween Canonical collected bug-fixes and packaged them to the new release since they were not aware of a breaking change.

     

    1
    Comment actions Permalink
  • Avatar
    Daniel Baus

    Fix worked, thank you. Had two servers going down this morning with an error I have never seen before...

    0
    Comment actions Permalink
  • Avatar
    Claus Siebeneicher

    Thank you for this quick fix to get the site up and running! However, since the apache update included also security updates (with published vulnerabilities),  wouldn't it be advised to go temporarily for the FastCGI solution as suggested by @Alphan Nguyen which also solves the problem (and worked fine for all my systems).
    Just suggesting.

    0
    Comment actions Permalink
  • Avatar
    José Aragón

    It works for me. Thanks a lot 

    0
    Comment actions Permalink
  • Avatar
    Luke Jones

    Unfortunately this fix does nothing for me. The commands work, the version switches, but I can't even access plesk: 

    0
    Comment actions Permalink
  • Avatar
    Giorgi Gogitidze

    Works for me as well, thanks a lot. I was wondering how we will know when the fix is available and how do we remove the hold on update? thanks

    0
    Comment actions Permalink
  • Avatar
    Marcos Hernández

    Ffffffff.....thanks, but I'd prefer that you warned us with a simple email. 

    0
    Comment actions Permalink
  • Avatar
    Jose de Vega (Edited )

    Solution that fix all domains:

    Update /opt/psa/admin/conf/templates/default/service/php_over_fpm.php file from:

    <IfModule mod_proxy_fcgi.c>
    <Files ~ (\.php$)>
    SetHandler proxy:<?php echo $VAR->domain->physicalHosting->fpmSocket ?>|fcgi://127.0.0.1:9000
    </Files>
    </IfModule>

    to 

    <IfModule mod_proxy_fcgi.c>
    <Files ~ (\.php$)>
    SetHandler proxy:<?php echo str_replace("///","/", $VAR->domain->physicalHosting->fpmSocket) ?>|fcgi://127.0.0.1:9000
    </Files>
    </IfModule>

     

    and rebuild all webserver configuration files

    1
    Comment actions Permalink
  • Avatar
    Webthinkers

    It is only a Plesk Issue? still our website is not working, not on Plesk

    0
    Comment actions Permalink
  • Avatar
    Sven Buchien

    Luke Jones i had the same problem. Your mysql.db is broken and you must restore them from your daily dump. Here is the article for that:

    https://support.plesk.com/hc/en-us/articles/213914385-MySQL-MariaDB-fails-to-start-on-a-Plesk-for-Linux-server-Can-t-open-and-lock-privilege-tables

    0
    Comment actions Permalink
  • Avatar
    Pascal Provost

    It works for me..Thank you.

    0
    Comment actions Permalink
  • Avatar
    Benjamin Weßel

    @Giorgi Gogitidze,

    We added instructions to unhold the package again.

    Our developers provided a fixed version of PhysicalHosting.php allowing a workaround without downgrading and holding the Apache packages. The instructions were added to the article. Unholding and updating the package can be done after this new workaround is applied.

    1
    Comment actions Permalink
  • Avatar
    Coopsy

    Benjamin Weßel ive just noticed this but im scared of touching it again :(

    1
    Comment actions Permalink
  • Avatar
    David Bolwell

    If we applied the first fix and downgraded and are then holding the updates should we now unhold using # apt-mark unhold apache2 let the update reapply and then apply the new fix given here?

    Or shoud I just leave as is until the issue is sorted?

    1
    Comment actions Permalink
  • Avatar
    Peter Weilharter

    Not all heroes wear capes!

    0
    Comment actions Permalink
  • Avatar
    Joseph Rebis

    I did the Apache downgrade, but then I see that this KB changed while I was working on it. Is this now the recommended solution? 

    "Replace updated version of file PhysicalHosting.php to /usr/local/psa/admin/plib/Template/Variable/Domain/"

    If I did the downgrade, should I do this as well? How do I take it off "hold" and get it on the correct version?

     

    2
    Comment actions Permalink
  • Avatar
    Andy Huber

    Wonderful!

     

    Thanks a lot .d

    0
    Comment actions Permalink
  • Avatar
    Mathias

    Claus Siebeneicher thank you for valid point regarding security. I think we need a permanent fix for this issue. But for now both the official quick fix solution with proper root user and the "not as quick fix" with FastCGI on all domains worked good for us. 

    Anton Maslov what is the status on this issue now? Do we all need to manually "unhold" the apache2 updates as fast as this issue is permanently fixed?

    Would be great to get some official statement from Plesk regarding the issue. I understand this is maybe related to an apache2 update problem initially, but I have been blindly taking for granted that Plesk has some sort of mechanism for staging or trying out new releases before they are pushed to all the production environments. I can see the issue popping up on the Plesk forum more then a week ago: https://talk.plesk.com/threads/all-domains-apache2-error-500.362208/

    Our sites was only down for a short time this morning, so I'm starting to questioning what has happened the last week before updates was pushed to our servers and in what degree we need to take more responsibility, and an even more manual approach to smaller updates like this... 

    0
    Comment actions Permalink
  • Avatar
    Nick H

    I also did the downgrade.  While running the now recommended solution I encounter permission errors.

    wget https://support.plesk.com/hc/en-us/article_attachments/4407402583954/PPPM-13232.tgz && tar -xvf PPPM-13232.tgz -C /usr/local/psa/admin/plib/Template/Variable/Domain/

    PhysicalHosting.php
    tar: PhysicalHosting.php: Cannot open: File exists
    tar: Exiting with failure status due to previous errors

    Does this need to be run as the root user? (sudo su -)  **Note: I tried adding 'sudo' to the command, same permission issue.
    -----
    Seems best to simply leave Apache downgraded until the issue is resolved.


    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request