Skip to content

Commit 5136018

Browse files
authored
Fix Apache IDN PHP scripts (hestiacp#4583)
* Fix Apache IDN PHP scripts Fix hestiacp#4508
1 parent ca31b7f commit 5136018

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)