small adjustments to install when ssl is activated and gentoo-config-templates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
|
||||
*/
|
||||
|
||||
return <<<FROXLORSQL
|
||||
return <<<'FROXLORSQL'
|
||||
DROP TABLE IF EXISTS `ftp_groups`;
|
||||
CREATE TABLE `ftp_groups` (
|
||||
`id` int(20) NOT NULL auto_increment,
|
||||
|
||||
@@ -429,7 +429,7 @@ class Core
|
||||
|
||||
// check currently used php version and set values of fpm/fcgid accordingly
|
||||
if (defined('PHP_MAJOR_VERSION') && defined('PHP_MINOR_VERSION')) {
|
||||
// @todo does not work for gentoo
|
||||
// gentoo specific
|
||||
if ($this->validatedData['distribution'] == 'gentoo') {
|
||||
// php-fpm
|
||||
$reload = "/etc/init.d/php-fpm restart";
|
||||
@@ -447,6 +447,11 @@ class Core
|
||||
$db_user->query("UPDATE `" . TABLE_PANEL_PHPCONFIGS . "` SET `binary` = '" . $binary . "';");
|
||||
}
|
||||
|
||||
if ($this->validatedData['use_ssl']) {
|
||||
// enable let's encrypt cron
|
||||
$db_user->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "` SET `isactive` = '1' WHERE `module` = 'froxlor/letsencrypt';");
|
||||
}
|
||||
|
||||
// set specific times for some crons (traffic only at night, etc.)
|
||||
$timestamp = mktime(0, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
|
||||
$db_user->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "` SET `lastrun` = '" . $timestamp . "' WHERE `cronfile` ='cron_traffic';");
|
||||
|
||||
@@ -65,43 +65,8 @@
|
||||
</commands>
|
||||
</general>
|
||||
<!-- HTTP Apache -->
|
||||
<daemon name="apache" version="2.2" title="Apache 2.2"
|
||||
default="true">
|
||||
<install><![CDATA[emerge www-servers/apache]]></install>
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<file name="/etc/apache2/modules.d/70_fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
<IfModule mod_fastcgi.c>
|
||||
FastCgiIpcDir <FPM_IPCDIR>
|
||||
|
||||
<Location "/fastcgiphp">
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
# Prevent accessing this path directly
|
||||
Allow from env=REDIRECT_STATUS
|
||||
</Location>
|
||||
</IfModule>
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<file name="{{settings.system.letsencryptacmeconf}}">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge"
|
||||
<Directory "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge">
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<command><![CDATA[rc-update add apache2 default]]></command>
|
||||
<command><![CDATA[{{settings.system.apachereload_command}}]]></command>
|
||||
</daemon>
|
||||
<daemon name="apache" version="2.4" title="Apache 2.4">
|
||||
<install><![CDATA[emerge www-servers/apache]]></install>
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<file name="/etc/apache2/modules.d/70_fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
@@ -3864,6 +3829,11 @@ aliases: files
|
||||
</visibility>
|
||||
<command><![CDATA[echo "www-servers/apache suexec" >> /etc/portage/package.use/froxlor]]></command>
|
||||
</commands>
|
||||
<install>
|
||||
<visibility mode="true">{{settings.system.mod_fcgid}}
|
||||
</visibility>
|
||||
<command><![CDATA[echo "www-servers/apache apache2_modules_proxy_fcgi" >> /etc/portage/package.use/froxlor]]></command>
|
||||
</install>
|
||||
<install>
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
@@ -3904,7 +3874,12 @@ aliases: files
|
||||
<install>
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<content><![CDATA[emerge www-servers/apache www-apache/mod_fastcgi]]></content>
|
||||
<content><![CDATA[emerge www-servers/apache www-apache/mod_fastcgi_handler]]></content>
|
||||
</install>
|
||||
<install>
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
<command><![CDATA[echo "www-servers/apache apache2_modules_proxy_fcgi" >> /etc/portage/package.use/froxlor]]></command>
|
||||
</install>
|
||||
<commands index="2">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
|
||||
Reference in New Issue
Block a user