From cf6042453f2e36ec45d2cfa127e232d367178204 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 21 Jul 2016 15:01:00 +0200 Subject: [PATCH] testing: Serve images in testresults via mod_rewrite and not a symlink --- testing/do-tests | 1 - .../winnetou/etc/apache2/sites-available/000-default.conf | 3 +++ testing/scripts/build-guestimages | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/do-tests b/testing/do-tests index d0d1ead887..f460d49885 100755 --- a/testing/do-tests +++ b/testing/do-tests @@ -934,7 +934,6 @@ HTDOCS="/var/www" ssh $SSHCONF root@${ipv4_winnetou} mkdir -p $HTDOCS/testresults > /dev/null 2>&1 scp $SSHCONF -r $TODAYDIR root@${ipv4_winnetou}:$HTDOCS/testresults > /dev/null 2>&1 -ssh $SSHCONF root@${ipv4_winnetou} ln -s $HTDOCS/images $HTDOCS/testresults/$TESTDATE/images > /dev/null 2>&1 echo echo "The results are available in $TODAYDIR" echo "or via the link http://$ipv4_winnetou/testresults/$TESTDATE" diff --git a/testing/hosts/winnetou/etc/apache2/sites-available/000-default.conf b/testing/hosts/winnetou/etc/apache2/sites-available/000-default.conf index 933589906f..03f93ad2e5 100644 --- a/testing/hosts/winnetou/etc/apache2/sites-available/000-default.conf +++ b/testing/hosts/winnetou/etc/apache2/sites-available/000-default.conf @@ -6,6 +6,9 @@ Options Indexes FollowSymLinks MultiViews + RewriteEngine on + RewriteRule "^/testresults/.+/images/(.*)" "/images/$1" [PT] + LogLevel warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined diff --git a/testing/scripts/build-guestimages b/testing/scripts/build-guestimages index e2ec422b11..8fd101003d 100755 --- a/testing/scripts/build-guestimages +++ b/testing/scripts/build-guestimages @@ -61,6 +61,7 @@ do execute "mkdir $LOOPDIR/var/log/apache2/ocsp" 0 execute "cp -rf $DIR/../images $LOOPDIR/var/www/" 0 execute_chroot "a2enmod -q cgid" 0 + execute_chroot "a2enmod -q rewrite" 0 execute_chroot "ln -s /etc/openssl/certs /var/www/certs" 0 execute_chroot "/etc/openssl/generate-crl" 0 execute_chroot "rm -rf /var/lib/ldap/*" 0 -- 2.47.2