testing: Serve images in testresults via mod_rewrite and not a symlink
authorTobias Brunner <tobias@strongswan.org>
Thu, 21 Jul 2016 13:01:00 +0000 (15:01 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 29 Aug 2016 16:11:42 +0000 (18:11 +0200)
testing/do-tests
testing/hosts/winnetou/etc/apache2/sites-available/000-default.conf
testing/scripts/build-guestimages

index d0d1ead..f460d49 100755 (executable)
@@ -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"
index 9335899..03f93ad 100644 (file)
@@ -6,6 +6,9 @@
                 Options Indexes FollowSymLinks MultiViews
         </Directory>
 
+        RewriteEngine on
+        RewriteRule "^/testresults/.+/images/(.*)" "/images/$1" [PT]
+
         LogLevel warn
         ErrorLog ${APACHE_LOG_DIR}/error.log
         CustomLog ${APACHE_LOG_DIR}/access.log combined
index e2ec422..8fd1010 100755 (executable)
@@ -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