From bc2d71dd8d155649fda81a47b3d999474e07d0b2 Mon Sep 17 00:00:00 2001 From: clecap Date: Sat, 2 Nov 2024 12:09:30 +0100 Subject: [PATCH] MP: --- .../etc/apache2/sites-enabled/dante-mediawiki.conf | 1 - images/dante-wiki/src/etc/logrotate.conf | 14 ++++++++++++++ .../home/dante/dantescript/run-apache-no-cache.sh | 7 +------ 3 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 images/dante-wiki/src/etc/logrotate.conf diff --git a/images/dante-wiki/src/etc/apache2/sites-enabled/dante-mediawiki.conf b/images/dante-wiki/src/etc/apache2/sites-enabled/dante-mediawiki.conf index 07dbb305..84bb675f 100644 --- a/images/dante-wiki/src/etc/apache2/sites-enabled/dante-mediawiki.conf +++ b/images/dante-wiki/src/etc/apache2/sites-enabled/dante-mediawiki.conf @@ -13,7 +13,6 @@ ServerTokens Prod ServerSignature Off # Allow pickup of environment variable for apache name -PassEnv APACHE_SERVER_NAME ServerName ${APACHE_SERVER_NAME} DocumentRoot "/var/www/html" diff --git a/images/dante-wiki/src/etc/logrotate.conf b/images/dante-wiki/src/etc/logrotate.conf new file mode 100644 index 00000000..5cdf442f --- /dev/null +++ b/images/dante-wiki/src/etc/logrotate.conf @@ -0,0 +1,14 @@ +# packages drop log rotation information into this directory +include /etc/logrotate.d + +/var/log/apache2/* { + weekly # Rotate logs weekly + rotate 4 # Keep 4 rotated logs + compress # Compress rotated logs + create # Create new empty log files after rotating old ones + missingok # Ignore if the log file is missing + notifempty # Don't rotate if log file is empty + postrotate + /usr/sbin/apache2ctl graceful > /dev/null 2>&1 || true + endscript +} \ No newline at end of file diff --git a/images/dante-wiki/src/home/dante/dantescript/run-apache-no-cache.sh b/images/dante-wiki/src/home/dante/dantescript/run-apache-no-cache.sh index 89a10567..d2e45943 100755 --- a/images/dante-wiki/src/home/dante/dantescript/run-apache-no-cache.sh +++ b/images/dante-wiki/src/home/dante/dantescript/run-apache-no-cache.sh @@ -44,12 +44,7 @@ printf "APACHE_SERVER_NAME = ${APACHE_SERVER_NAME}\n" # opportunity to exec into the then stopped container printf "\n*** run-apache-no-cache.sh: Starting apache NO-CACHE ...\n" - sudo apachectl \ - -D NO_CACHE \ - -D USE_APACHE_PASSWORD \ - -D APACHE_AUTH_NAME \ - -D APACHE_AUTH_USER \ - -k start & + sudo apachectl -D NO_CACHE -k start & printf "DONE with starting apache\n" printf "${GREEN}*** EXITING run-apache-no-cache.sh\n\n" \ No newline at end of file