cvs: php-master-web /scripts mirror-test
| From: | Gabor Hojtsy | Date: | Tue, 09 May 2006 18:20:56 +0000 |
| Subject: | cvs: php-master-web /scripts mirror-test | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-31489@lists.php.net to get a copy of this message | ||
goba Tue May 9 18:20:56 2006 UTC
Modified files:
/php-master-web/scripts mirror-test
Log:
check for correct ServerName - modified patch by Dave Barr
http://cvs.php.net/viewcvs.cgi/php-master-web/scripts/mirror-test?r1=1.73&r2=1.74&diff_format=u
Index: php-master-web/scripts/mirror-test
diff -u php-master-web/scripts/mirror-test:1.73 php-master-web/scripts/mirror-test:1.74
--- php-master-web/scripts/mirror-test:1.73 Sun Nov 21 12:37:43 2004
+++ php-master-web/scripts/mirror-test Tue May 9 18:20:55 2006
@@ -139,13 +139,28 @@
if ($info[6] == "manual-alias") {
$hosts[$index]['lastupdated'] = '0';
$hosts[$index]['problem'] = "Apache manual alias in effect";
+ continue;
}
// Check that the mirror has all the mirror settings updated
if ($info[7] != '1') {
$hosts[$index]['problem'] = "Mirror settings are not up to date (check rsync
parameters)";
+ continue;
+ }
+
+ // Check if mirror has correct ServerName/ServerAlias entries
+ // Most likely cause is unofficial hostname as ServerName instead of ServerAlias
+ // Important to keep my php.net cookie around
+ $mysite = parse_url($info[0]);
+ if (is_array($mysite)) {
+ $mysite = $mysite['host'];
+ }
+
+ if (!$mysite || $mysite != $host['hostname']) {
+ $hosts[$index]['problem'] = "Apache ServerName directive does not match
'{$host['hostname']}'."
+ . " (consider swapping ServerName and ServerAlias)";
+ continue;
}
-
}
// Go through all mirror sites checked