Skip to content

Commit 1e45dee

Browse files
authored
Revert "Fix Apache IDN PHP scripts (hestiacp#4583)" (hestiacp#4675)
This reverts commit 5136018. This makes us go back to using SetHandler instead of ProxyPassMatch The SetHandler unicode problems appears to have been fixed in upstream apache httpd 2.4.59 , so the solution to running domains with unicode/cyrillic characters should just be to update to apache>=2.4.59 ref php/php-src#17083 (comment) The ProxyPassMatch solution added new problems with OpenCart like https://forum.hestiacp.com/t/php-file-not-found-but-it-exists/16694/4 AH01136: Unescaped URL path matched ProxyPass; ignoring unsafe nocanon [proxy:error] [pid 204010:tid 204023] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:8000 (localhost:8000) failed
1 parent 83e733d commit 1e45dee

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

install/deb/templates/web/apache2/php-fpm/default.stpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
SSLCertificateKeyFile %ssl_key%
3232
%ssl_ca_str%SSLCertificateChainFile %ssl_ca%
3333

34-
ProxyPassMatch ^/(.*\.php)(?:$|\?) "%backend_lsnr%|fcgi://localhost%sdocroot%/$1" nocanon
35-
34+
<FilesMatch \.php$>
35+
SetHandler "proxy:%backend_lsnr%|fcgi://localhost"
36+
</FilesMatch>
3637
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
3738

3839
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.ssl.conf_*

install/deb/templates/web/apache2/php-fpm/default.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
Options +Includes -Indexes +ExecCGI
2929
</Directory>
3030

31-
ProxyPassMatch ^/(.*\.php)(?:$|\?) "%backend_lsnr%|fcgi://localhost%docroot%/$1" nocanon
31+
<FilesMatch \.php$>
32+
SetHandler "proxy:%backend_lsnr%|fcgi://localhost"
33+
</FilesMatch>
3234
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
3335

3436
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.conf_*

install/rpm/templates/web/httpd/php-fpm/default.stpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
SSLCertificateKeyFile %ssl_key%
2626
%ssl_ca_str%SSLCertificateChainFile %ssl_ca%
2727

28-
ProxyPassMatch ^/(.*\.php)(?:$|\?) "%backend_lsnr%|fcgi://localhost%sdocroot%/$1" nocanon
28+
<FilesMatch \.php$>
29+
SetHandler "proxy:%backend_lsnr%|fcgi://localhost"
30+
</FilesMatch>
2931
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
3032

3133
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.ssl.conf_*

install/rpm/templates/web/httpd/php-fpm/default.tpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
Options +Includes -Indexes +ExecCGI
2323
</Directory>
2424

25-
ProxyPassMatch ^/(.*\.php)(?:$|\?) "%backend_lsnr%|fcgi://localhost%docroot%/$1" nocanon
26-
25+
<FilesMatch \.php$>
26+
SetHandler "proxy:%backend_lsnr%|fcgi://localhost"
27+
</FilesMatch>
2728
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
2829

2930
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.conf_*

0 commit comments

Comments
 (0)