Skip to content

Commit

Permalink
Update PHPInstaller.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bobicloudvision committed Dec 9, 2024
1 parent ffaab8d commit 524336f
Showing 1 changed file with 23 additions and 26 deletions.
49 changes: 23 additions & 26 deletions web/app/Installers/Server/Applications/PHPInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,6 @@ public function install()
$commands[] = 'apt-get update -yq';


$apacheCommands = [];
$apacheCommands[] = 'a2enmod cgi';
$apacheCommands[] = 'a2enmod deflate';
$apacheCommands[] = 'a2enmod expires';
$apacheCommands[] = 'a2enmod mime';
$apacheCommands[] = 'a2enmod rewrite';
$apacheCommands[] = 'a2enmod env';
$apacheCommands[] = 'a2enmod ssl';
$apacheCommands[] = 'a2enmod actions';
$apacheCommands[] = 'a2enmod headers';
$apacheCommands[] = 'a2enmod suexec';
$apacheCommands[] = 'a2enmod ruid2';
$apacheCommands[] = 'a2enmod proxy';
$apacheCommands[] = 'a2enmod proxy_http';

// For Fast CGI
// $apacheCommands[] = 'a2enmod fcgid';
// $apacheCommands[] = 'a2enmod alias';
// $apacheCommands[] = 'a2enmod proxy_fcgi';
// $apacheCommands[] = 'a2enmod setenvif';

// $apacheCommands[] = 'ufw allow in "Apache Full"';


$dependenciesListApache = [
'apache2',
'apache2-suexec-custom',
Expand All @@ -70,7 +46,6 @@ public function install()

$dependenciesApache = implode(' ', $dependenciesListApache);
$commands[] = 'apt-get install -yq ' . $dependenciesApache;
$commands = array_merge($commands, $apacheCommands);

if (!empty($this->phpVersions)) {
foreach ($this->phpVersions as $phpVersion) {
Expand Down Expand Up @@ -102,6 +77,28 @@ public function install()
}
}

$commands[] = 'a2enmod cgi';
$commands[] = 'a2enmod deflate';
$commands[] = 'a2enmod expires';
$commands[] = 'a2enmod mime';
$commands[] = 'a2enmod rewrite';
$commands[] = 'a2enmod env';
$commands[] = 'a2enmod ssl';
$commands[] = 'a2enmod actions';
$commands[] = 'a2enmod headers';
$commands[] = 'a2enmod suexec';
$commands[] = 'a2enmod ruid2';
$commands[] = 'a2enmod proxy';
$commands[] = 'a2enmod proxy_http';

// For Fast CGI
// $commands[] = 'a2enmod fcgid';
// $commands[] = 'a2enmod alias';
// $commands[] = 'a2enmod proxy_fcgi';
// $commands[] = 'a2enmod setenvif';

// $commands[] = 'ufw allow in "Apache Full"';


$commands[] = 'systemctl restart apache2';
$commands[] = 'phyre-php /usr/local/phyre/web/artisan phyre:run-repair';
Expand All @@ -117,8 +114,8 @@ public function install()
$shellFileContent .= 'rm -f /tmp/php-installer.sh';

file_put_contents('/tmp/php-installer.sh', $shellFileContent);

shell_exec('chmod +x /tmp/php-installer.sh');

shell_exec('bash /tmp/php-installer.sh >> ' . $this->logFilePath . ' &');

}
Expand Down

0 comments on commit 524336f

Please sign in to comment.