apache: Redirect all logs to systemd journal

- Redirect with separate identifiers so that they can retrieved separately.

- Enable virtual host log format that include name of the domain accessed so
that that information is preserved.

- There is no need to increment the apache app's version number as it has been
incremented earlier in the patch series (for this release).

Tests:

- In a fresh container, setup succeeds. Default apache sites 000-default.conf
and default-ssl.conf are disabled. freedombox-default.conf is enabled. Apache
access logs and error logs are sent to systemd journal.

- Without the patch applied, create a container. Run setup and access Plinth
interface. Apply the patches. Apache setup is run. a2query -s default and
a2query -s 000-default show that sites are not enabled. a2query -s
freedombox-default shows that site is enabled. Apache access logs and error logs
are sent to systemd journal.

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 2022-07-17 12:07:55 -04:00
1 parent d6131df6a8
commit bf1ed7d064
3 files changed
+55 -2

No files matched your search

+3 -2
View File
@@ -168,11 +168,12 @@ def subcommand_setup(arguments):
webserver.enable('javascript-common', kind='config')
# default sites
webserver.enable('000-default', kind='site')
webserver.disable('000-default', kind='site')
webserver.disable('default-tls', kind='site')
webserver.enable('default-ssl', kind='site')
webserver.disable('default-ssl', kind='site')
webserver.disable('plinth', kind='site')
webserver.disable('plinth-ssl', kind='site')
webserver.enable('freedombox-default', kind='site')
# TODO: Check that the (name, kind) is a managed by FreedomBox before