https://bz.apache.org/bugzilla/show_bug.cgi?id=69203
Bug ID: 69203
Summary: proxy error from php-fpm backend for paths containing
spaces
Product: Apache httpd-2
Version: 2.4.61
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_proxy_fcgi
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Since upgrading from Apache 2.4.59 to Apache 2.4.61 I see errors from php-fpm
backends for url paths containing spaces:
(domain name was changed here to example.com for privacy purposes)
Request: curl http://example.com/info%201.php
Error Log (with LogLevel set to trace6) for Apache 2.4.61:
> [2024-07-17 10:34:52.254685] [proxy:trace2] example.com X.X.X.X:50048 *:
> fixup UDS from
> proxy:unix:/run/php-fpm/8.2/testuser.sock|fcgi://localhost/home/www/example.com/info
> 1.php: fcgi://localhost/home/www/example.com/info 1.php
> (/run/php-fpm/8.2/testuser.sock)
> [2024-07-17 10:34:52.254717] [proxy_fcgi:trace1] example.com X.X.X.X:50048
> canonicalising URL //localhost/home/www/example.com/info 1.php
> [2024-07-17 10:34:52.254726] [proxy_fcgi:debug] example.com X.X.X.X:50048
> AH01060: set r->filename to
> proxy:fcgi://localhost/home/www/example.com/info%201.php
> [2024-07-17 10:34:52.254739] [proxy:trace2] example.com X.X.X.X:50048 fcgi:
> found worker fcgi://localhost for
> fcgi://localhost/home/www/example.com/info%201.php
> [2024-07-17 10:34:52.254744] [proxy:debug] example.com X.X.X.X:50048 AH01143:
> Running scheme fcgi handler (attempt 0)
> [2024-07-17 10:34:52.254754] [proxy_fcgi:debug] example.com X.X.X.X:50048
> AH01076: url: fcgi://localhost/home/www/example.com/info%201.php proxyname:
> (null) proxyport: 0
> [2024-07-17 10:34:52.254759] [proxy_fcgi:debug] example.com X.X.X.X:50048
> AH01078: serving URL fcgi://localhost/home/www/example.com/info%201.php
> [2024-07-17 10:34:52.254803] [proxy:debug] example.com AH00942: FCGI: has
> acquired connection for (localhost:8000)
> [2024-07-17 10:34:52.254814] [proxy:debug] example.com X.X.X.X:50048 AH00944:
> connecting fcgi://localhost/home/www/example.com/info%201.php to
> localhost:8000
> [2024-07-17 10:34:52.254824] [proxy:debug] example.com X.X.X.X:50048 AH02545:
> fcgi: has determined UDS as /run/php-fpm/8.2/testuser.sock (for
> localhost:8000)
> [2024-07-17 10:34:52.254840] [proxy:debug] example.com X.X.X.X:50048 AH00947:
> connecting /home/www/example.com/info%201.php to
> /run/php-fpm/8.2/testuser.sock:0 (localhost:8000)
> [2024-07-17 10:34:52.254994] [proxy:debug] example.com AH02823: FCGI:
> connection established with Unix domain socket /run/php-fpm/8.2/testuser.sock
> (localhost:8000)
> [2024-07-17 10:34:52.259420] [proxy_fcgi:error] example.com X.X.X.X:50048
> AH01071: Got error 'Primary script unknown'
> [2024-07-17 10:34:52.259547] [proxy_fcgi:trace4] example.com X.X.X.X:50048
> Headers from script 'info%201.php':
> [2024-07-17 10:34:52.259571] [proxy_fcgi:trace4] example.com X.X.X.X:50048
> Status: 404 Not Found
> [2024-07-17 10:34:52.259604] [proxy_fcgi:trace1] example.com X.X.X.X:50048
> Status line from script 'info%201.php': 404 Not Found
> [2024-07-17 10:34:52.259617] [proxy_fcgi:trace4] example.com X.X.X.X:50048
> Content-type: text/html; charset=UTF-8
> [2024-07-17 10:34:52.259686] [proxy:debug] example.com AH00943: FCGI: has
> released connection for (localhost:8000)
The whitespace in the filename path which is send to the fpm backend is clearly
url encoded, and the fpm backend can't find that file.
However in Apache 2.4.59 this was not the case, and this was working properly:
> [2024-07-17 13:26:24.090205] [proxy:trace2] example.com X.X.X.X:57720 fcgi:
> found worker fcgi://localhost for
> unix:/run/php-fpm/8.2/testuser.sock|fcgi://localhost/home/www/example.com/info
> 1.php
> [2024-07-17 13:26:24.090216] [proxy:trace2] example.com X.X.X.X:57720 *:
> rewrite of url due to UDS(/run/php-fpm/8.2/testuser.sock):
> fcgi://localhost/home/www/example.com/info 1.php
> (proxy:fcgi://localhost/home/www/example.com/info 1.php)
> [2024-07-17 13:26:24.090223] [proxy:debug] example.com X.X.X.X:57720 AH01143:
> Running scheme unix handler (attempt 0)
> [2024-07-17 13:26:24.090242] [proxy_fcgi:debug] example.com X.X.X.X:57720
> AH01076: url: fcgi://localhost/home/www/example.com/info 1.php proxyname:
> (null) proxyport: 0
> [2024-07-17 13:26:24.090252] [proxy_fcgi:debug] example.com X.X.X.X:57720
> AH01078: serving URL fcgi://localhost/home/www/example.com/info 1.php
> [2024-07-17 13:26:24.090299] [proxy:debug] example.com AH00942: FCGI: has
> acquired connection for (localhost:8000)
> [2024-07-17 13:26:24.090315] [proxy:debug] example.com X.X.X.X:57720 AH00944:
> connecting fcgi://localhost/home/www/example.com/info 1.php to localhost:8000
> [2024-07-17 13:26:24.090322] [proxy:debug] example.com X.X.X.X:57720 AH02545:
> fcgi: has determined UDS as /run/php-fpm/8.2/testuser.sock (for
> localhost:8000)
> [2024-07-17 13:26:24.090348] [proxy:debug] example.com X.X.X.X:57720 AH00947:
> connecting /home/www/example.com/info 1.php to
> /run/php-fpm/8.2/testuser.sock:0 (localhost:8000)
> [2024-07-17 13:26:24.090438] [proxy:debug] example.com AH02823: FCGI:
> connection established with Unix domain socket /run/php-fpm/8.2/testuser.sock
> (localhost:8000)
> [2024-07-17 13:26:24.634856] [proxy_fcgi:trace4] example.com X.X.X.X:57720
> Headers from script 'info 1.php':
> [2024-07-17 13:26:24.634878] [proxy_fcgi:trace4] example.com X.X.X.X:57720
> Content-type: text/html; charset=UTF-8
> [2024-07-17 13:26:24.634901] [proxy:debug] example.com AH00943: FCGI: has
> released connection for (localhost:8000)
Used vhost/proxy config:
> <VirtualHost *>
> ServerName example.com
> DocumentRoot "/home/www/example.com"
> <FilesMatch "\.php$">
> SetHandler "proxy:unix:/run/php-fpm/8.2/testuser.sock|fcgi://localhost"
> </FilesMatch>
> </VirtualHost>
7 substitutions on 7 lines
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]