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 authored and James Valleroy committed 2023-06-05 20:30:06 -04:00
1 parent 86444764a7
commit c6817ab462
4 files changed
+10 -1

No files matched your search

+8 -1
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)