apache vhost: PHP: use FcgidInitialEnv and cgi-bin

This commit is contained in:
Timotheus Pokorra 2024-01-17 19:49:34 +01:00
parent bf2a2a885e
commit 6e2db93a0f
3 changed files with 4 additions and 4 deletions

View File

@ -96,7 +96,7 @@
#end
#if( ${fcgiphpbin} )
SetEnv HTTP_PHP_BIN ${fcgiphpbin}
FcgidInitialEnv HTTP_PHP_BIN ${fcgiphpbin}
#end
AddType application/x-httpd-php .php
Action application/x-httpd-php /fastcgi-bin/phpstub
@ -202,7 +202,7 @@
#end
#if( ${fcgiphpbin} )
SetEnv HTTP_PHP_BIN ${fcgiphpbin}
FcgidInitialEnv HTTP_PHP_BIN ${fcgiphpbin}
#end
AddType application/x-httpd-php .php
Action application/x-httpd-php /fastcgi-bin/phpstub

View File

@ -171,7 +171,7 @@ public class DomainTest {
setParams.put("passengerruby", newPassengerRuby);
String newPassengerNodejs = "/home/pacs/aaa00/users/admin/.nvm/versions/node/v18.19.0/bin/node";
setParams.put("passengernodejs", newPassengerNodejs);
String newFcgiPhpBin = "/usr/bin/php8.1";
String newFcgiPhpBin = "/usr/lib/cgi-bin/php8.1";
setParams.put("fcgiphpbin", newFcgiPhpBin);
String[] newDomainOptions = new String[] {"greylisting", "letsencrypt", "passenger", "passengerfriendlyerrorpages", "cgi", "fastcgi"};

View File

@ -270,7 +270,7 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
setPathInTemplate(templateVars, "passengerpython", "/usr/bin/python3", dom.getPassengerpython());
setPathInTemplate(templateVars, "passengernodejs", "/usr/bin/node", dom.getPassengernodejs());
setPathInTemplate(templateVars, "passengerruby", "/usr/bin/ruby", dom.getPassengerruby());
setPathInTemplate(templateVars, "fcgiphpbin", "/usr/bin/php", dom.getFcgiphpbin());
setPathInTemplate(templateVars, "fcgiphpbin", "/usr/lib/cgi-bin/php", dom.getFcgiphpbin());
final boolean isSetLetsencryptOption = templateVars.get("letsencrypt").equals(Boolean.TRUE);
final Processor domSetupProcessor = new CompoundProcessor(
isSetLetsencryptOption ? new NullProcessor() : new ShellProcessor("rm -f /etc/apache2/pems-generated/" + domName + ".crt"),