diff --git a/tests/runtests.pl b/tests/runtests.pl
index ffab484cb15e966c73b95475f18db6a0d81ecd2a..944418d2d221c4951afe8f9e283f5761487a7346 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -723,6 +723,7 @@ sub subVariables {
   my ($thing) = @_;
   $$thing =~ s/%HOSTIP/$HOSTIP/g;
   $$thing =~ s/%HOSTPORT/$HOSTPORT/g;
+  $$thing =~ s/%HTTPPORT/$HOSTPORT/g;
   $$thing =~ s/%HTTPSPORT/$HTTPSPORT/g;
   $$thing =~ s/%FTPPORT/$FTPPORT/g;
   $$thing =~ s/%FTPSPORT/$FTPSPORT/g;