diff --git a/plinth/modules/zoph/__init__.py b/plinth/modules/zoph/__init__.py index 2dd82f7d7..85aec2b00 100644 --- a/plinth/modules/zoph/__init__.py +++ b/plinth/modules/zoph/__init__.py @@ -7,6 +7,7 @@ from django.utils.translation import gettext_lazy as _ from plinth import app as app_module from plinth import cfg, frontpage, menu +from plinth.config import DropinConfigs from plinth.modules.apache.components import Webserver from plinth.modules.backups.components import BackupRestore from plinth.modules.firewall.components import Firewall @@ -42,7 +43,7 @@ class ZophApp(app_module.App): app_id = 'zoph' - _version = 1 + _version = 2 def __init__(self): """Create components for the app.""" @@ -76,10 +77,18 @@ class ZophApp(app_module.App): ports=['http', 'https'], is_external=True) self.add(firewall) + dropin_configs = DropinConfigs('dropin-configs-zoph', [ + '/etc/apache2/conf-available/zoph-freedombox.conf', + ]) + self.add(dropin_configs) + webserver = Webserver('webserver-zoph', 'zoph', urls=['https://{host}/zoph/']) self.add(webserver) + webserver = Webserver('webserver-zoph-freedombox', 'zoph-freedombox') + self.add(webserver) + backup_restore = ZophBackupRestore('backup-restore-zoph', **manifest.backup) self.add(backup_restore) @@ -91,6 +100,9 @@ class ZophApp(app_module.App): privileged.setup() if not old_version: self.enable() + elif old_version < 2: + if self.get_component('webserver-zoph').is_enabled(): + self.enable() class ZophBackupRestore(BackupRestore): diff --git a/plinth/modules/zoph/data/usr/share/freedombox/etc/apache2/conf-available/zoph-freedombox.conf b/plinth/modules/zoph/data/usr/share/freedombox/etc/apache2/conf-available/zoph-freedombox.conf new file mode 100644 index 000000000..25cf0f72c --- /dev/null +++ b/plinth/modules/zoph/data/usr/share/freedombox/etc/apache2/conf-available/zoph-freedombox.conf @@ -0,0 +1,5 @@ + + + ProxyFCGISetEnvIf true PHP_VALUE "max_execution_time = 100 \n upload_max_filesize = 16M \n post_max_size = 16M" + +