use hs-phpstub as phpstub

This commit is contained in:
Peter Hormanns 2024-01-25 18:01:43 +01:00
parent b16ba63833
commit 22a99e98a3
3 changed files with 9 additions and 14 deletions

View File

@ -4,9 +4,7 @@ ALTER TABLE domain
ADD COLUMN passenger_nodejs character varying(256) DEFAULT '/usr/bin/node', ADD COLUMN passenger_nodejs character varying(256) DEFAULT '/usr/bin/node',
ADD COLUMN passenger_ruby character varying(256) DEFAULT '/usr/bin/ruby', ADD COLUMN passenger_ruby character varying(256) DEFAULT '/usr/bin/ruby',
ADD COLUMN fcgi_php_bin character varying(256) DEFAULT '/usr/lib/cgi-bin/php'; ADD COLUMN fcgi_php_bin character varying(256) DEFAULT '/usr/lib/cgi-bin/php';
UPDATE domain SET fcgi_php_bin = '/usr/lib/cgi-bin/php7.4';
INSERT INTO domain_option (domain_option_name) VALUES INSERT INTO domain_option (domain_option_name) VALUES
('passenger'), ('passenger'),
('passengerfriendlyerrorpages'), ('passengerfriendlyerrorpages'),

View File

@ -104,7 +104,7 @@
FcgidInitialEnv HTTP_PHP_BIN ${fcgiphpbin} FcgidInitialEnv HTTP_PHP_BIN ${fcgiphpbin}
#end #end
AddType application/x-httpd-php .php AddType application/x-httpd-php .php
Action application/x-httpd-php /fastcgi-bin/phpstub Action application/x-httpd-php /fastcgi-bin/hs-phpstub
#end #end
</VirtualHost> </VirtualHost>
@ -215,6 +215,6 @@
FcgidInitialEnv HTTP_PHP_BIN ${fcgiphpbin} FcgidInitialEnv HTTP_PHP_BIN ${fcgiphpbin}
#end #end
AddType application/x-httpd-php .php AddType application/x-httpd-php .php
Action application/x-httpd-php /fastcgi-bin/phpstub Action application/x-httpd-php /fastcgi-bin/hs-phpstub
#end #end
</VirtualHost> </VirtualHost>

View File

@ -237,14 +237,14 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
new CreateFileProcessor("/de/hsadmin/mods/dom/index.html.vm", templateVars, dom, domainDir + "/subs-ssl/www/index.html", userName, pacName, "644", false) new CreateFileProcessor("/de/hsadmin/mods/dom/index.html.vm", templateVars, dom, domainDir + "/subs-ssl/www/index.html", userName, pacName, "644", false)
); );
domDirsProcessor.appendProcessor( domDirsProcessor.appendProcessor(
new CopyFileProcessor("/usr/local/src/phpstub/phpstub", domainDir + "/fastcgi/phpstub", userName, pacName, "755") new CopyFileProcessor("/usr/local/src/phpstub/hs-phpstub", domainDir + "/fastcgi/hs-phpstub", userName, pacName, "755")
); );
domDirsProcessor.appendProcessor( domDirsProcessor.appendProcessor(
new CopyFileProcessor("/usr/local/src/phpstub/phpstub", domainDir + "/fastcgi-ssl/phpstub", userName, pacName, "755") new CopyFileProcessor("/usr/local/src/phpstub/hs-phpstub", domainDir + "/fastcgi-ssl/hs-phpstub", userName, pacName, "755")
); );
domDirsProcessor.appendProcessor( domDirsProcessor.appendProcessor(
new ShellProcessor("chattr +i " + domainDir + "/fastcgi/phpstub && " + new ShellProcessor("chattr +i " + domainDir + "/fastcgi/hs-phpstub && " +
"chattr +i " + domainDir + "/fastcgi-ssl/phpstub") "chattr +i " + domainDir + "/fastcgi-ssl/hs-phpstub")
); );
domDirsProcessor.appendProcessor( domDirsProcessor.appendProcessor(
new ShellProcessor("ln -sf " + domainDir + " /home/doms/ && " + new ShellProcessor("ln -sf " + domainDir + " /home/doms/ && " +
@ -337,12 +337,9 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
" && rm -f /etc/apache2/pems-generated/" + domname + ".crt" + " && rm -f /etc/apache2/pems-generated/" + domname + ".crt" +
" && rm -f /etc/apache2/pems-generated/" + domname + ".key" + " && rm -f /etc/apache2/pems-generated/" + domname + ".key" +
" && rm -f /etc/apache2/pems-generated/" + domname + ".chain" + " && rm -f /etc/apache2/pems-generated/" + domname + ".chain" +
" && chattr -i " + homedir + "/doms/" + domname + "/fastcgi/phpstub" +
" && chattr -i " + homedir + "/doms/" + domname + "/fastcgi-ssl/phpstub" +
" && mkdir " + homedir + "/doms.bak" + " && mkdir " + homedir + "/doms.bak" +
" && mv " + homedir + "/doms/" + domname + " " + homedir + "/doms.bak/" + " && mv " + homedir + "/doms/" + domname + " " + homedir + "/doms.bak/" +
" && chown -R " + username + ":" + username + " " + homedir + "/doms.bak" + " && chown -R " + username + ":" + username + " " + homedir + "/doms.bak" +
// " && salt-call state.sls pacs " +
" && invoke-rc.d apache2 reload >/dev/null 2>&1"); " && invoke-rc.d apache2 reload >/dev/null 2>&1");
} }
return return
@ -355,8 +352,8 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
" && rm -f /etc/apache2/pems-generated/" + domname + ".crt" + " && rm -f /etc/apache2/pems-generated/" + domname + ".crt" +
" && rm -f /etc/apache2/pems-generated/" + domname + ".key" + " && rm -f /etc/apache2/pems-generated/" + domname + ".key" +
" && rm -f /etc/apache2/pems-generated/" + domname + ".chain" + " && rm -f /etc/apache2/pems-generated/" + domname + ".chain" +
" && chattr -i " + homedir + "/doms/" + domname + "/fastcgi/phpstub" + " && chattr -i " + homedir + "/doms/" + domname + "/fastcgi/hs-phpstub" +
" && chattr -i " + homedir + "/doms/" + domname + "/fastcgi-ssl/phpstub" + " && chattr -i " + homedir + "/doms/" + domname + "/fastcgi-ssl/hs-phpstub" +
" && rm -rf " + homedir + "/doms/" + domname + " && rm -rf " + homedir + "/doms/" + domname +
" && invoke-rc.d apache2 reload >/dev/null 2>&1"); " && invoke-rc.d apache2 reload >/dev/null 2>&1");
} }