• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

PHP-FPM socket connection fails if a domain or subdomain is created with a capital letter

Bitpalast

Plesk addicted!
Plesk Guru
TITLE:
PHP-FPM socket connection fails if a domain or subdomain is created with a capital letter
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
Onyx 17, latest MU, CentOS 7.3, 64-Bit
PROBLEM DESCRIPTION:
When a domain or subdomain is created with a capital letter, e.g. Summer.mydomain.tld instead of summer.mydomain.tld, the PHP-FPM socket file in /var/www/vhosts/system/Summer.mydomain.tld is not referenced by Summer.mydomain.tld/php-fpm.sock, but summer.mydomain.tld/php-fpm.sock, while the path needs a capital letter. The socket cannot be found, hence FPM service does not work for that domain.​
STEPS TO REPRODUCE:
Create an add-on domain or subdomain and use a capital letter in the domain name.​
ACTUAL RESULT:
Reference in config files to php-fpm.sock is in all small letters while the actual file path on the file system contains a capital letter.​
EXPECTED RESULT:
Reference in config files to php-fpm.sock must reflect the exact capitalization of the path, else the socket cannot be reached.​
ANY ADDITIONAL INFORMATION:
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:
Confirm bug
 
unconfirmed:

Thank you for testing!
Yet, I know it's been there. The customer got a 503 error from Nginx, and when I digged into it I found

Code:
[Fri Mar 17 18:46:47.113928 2017] [proxy:error] [pid 8006] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/www/vhosts/system/sommer.XXXX.org/php-fpm.sock (*) failed
[Fri Mar 17 18:46:47.113963 2017] [proxy_fcgi:error] [pid 8006] [client 5.146.YYY.XXX:43300] AH01079: failed to make connection to backend: httpd-UDS

while the file path was /var/www/vhosts/system/Sommer.XXXX.org. The error could only be resolved by removing the subdomain an re-creating in in all small letters. I have seen the wrong capitalization in the socket reference, so I am sure that the problem exists. But I am unable to reproduce it on the test machine. So what is going on with this one? I can't think of any reason why this should fail randomly. There must be a way how the customer managed to create the different capitalization, and its probably a very easy way that I don't see at the moment.
 
@UFHH01: Could you please create the setup on a machine of yours and actually test it by opening a PHP page on such a domain? I have just done that on my test machine and was able to reproduce the issue. While the filenames are correctly displayed in the configuration files, the error I am getting is the same as the customer got:

Code:
[Sat Mar 18 20:58:02.744017 2017] [proxy:error] [pid 27983] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/www/vhosts/system/summer.xxx.xxx.net/php-fpm.sock (*) failed
[Sat Mar 18 20:58:02.744038 2017] [proxy_fcgi:error] [pid 27983] [client 88.73.72.1:34158] AH01079: failed to make connection to backend: httpd-UDS

But in the configuration files the spelling is not /system/summer... but /system/Summer...

Any idea why PHP FPM is complaining about not finding php-fpm.sock and using the "wrong" path? Where could this path be mentioned besides the files you already checked? It's not in the /opt/plesk paths, neither in the /system paths, but it must be somewhere.
 
Just for the record: https://talk.plesk.com/threads/plesk-12-5-php-fpm-socket-capital-letters-path-error.338507/
According to that thread and the linked article, it is a bug in mod_proxy that was resolved in versions later 2.4.13.

I am testing on:
Server version: Apache/2.4.6 (CentOS)
Server built: Nov 14 2016 18:04:44

and
Installed Packages
Name : psa-mod_proxy
Arch : x86_64
Version : 2.4.6
Release : centos7.16102516
Size : 130 k
Repo : installed
From repo : PLESK_17_0_17-dist

Someone from the Plesk team needs to answer this, I guess. I am not sure how to upgrade Apache to 2.4.13 and whether that is recommended at all and whether Plesk provides the appropriate mod_proxy module that does not contain the capital-letter bug.
 
Never mind. Thought so, and it's actually good that you are Ubuntu/Debian based while I am RHEL/CentOS based. That gives all of us a much broader knowledge base.
 
Back
Top