apache: Use drop-in config component for /etc files

Tests:

- Config files are all symlinks in /etc/
- ttrss app's web interface works
- Incorrect password attempts in LDAP login with /tt-rss-app/ get registered by
  fail2ban

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2023-05-16 13:55:06 -07:00 committed by James Valleroy
parent 86444764a7
commit c6817ab462
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
4 changed files with 10 additions and 1 deletions

View File

@ -87,6 +87,8 @@ rm_conffile /etc/plinth/modules-enabled/users 23.10~
rm_conffile /etc/plinth/modules-enabled/wireguard 23.10~
rm_conffile /etc/plinth/modules-enabled/wordpress 23.10~
rm_conffile /etc/plinth/modules-enabled/zoph 23.10~
rm_conffile /etc/apache2/conf-available/php-fpm-freedombox.conf 23.10~
rm_conffile /etc/fail2ban/jail.d/apache-auth-freedombox.conf 23.10~
rm_conffile /etc/apache2/conf-available/deluge-plinth.conf 23.10~
rm_conffile /etc/dovecot/conf.d/15-freedombox-mail.conf 23.10~
rm_conffile /etc/dovecot/conf.d/05-freedombox-passdb.conf 23.10~

View File

@ -7,6 +7,7 @@ from django.utils.translation import gettext_lazy as _
from plinth import app as app_module
from plinth import cfg
from plinth.config import DropinConfigs
from plinth.daemon import Daemon, RelatedDaemon
from plinth.modules.firewall.components import Firewall
from plinth.modules.letsencrypt.components import LetsEncrypt
@ -21,7 +22,7 @@ class ApacheApp(app_module.App):
app_id = 'apache'
_version = 11
_version = 12
def __init__(self):
"""Create components for the app."""
@ -36,6 +37,12 @@ class ApacheApp(app_module.App):
])
self.add(packages)
dropin_configs = DropinConfigs('dropin-configs-apache', [
'/etc/apache2/conf-available/php-fpm-freedombox.conf',
'/etc/fail2ban/jail.d/apache-auth-freedombox.conf',
])
self.add(dropin_configs)
web_server_ports = Firewall('firewall-web', _('Web Server'),
ports=['http', 'https'], is_external=True)
self.add(web_server_ports)