RE: setting up mirror not in documentroot

From: Date: Fri, 30 Jan 2009 10:52:16 +0000
Subject: RE: setting up mirror not in documentroot
References: 1 2 3 4  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-37012@lists.php.net to get a copy of this message
-----Original Message----- From: Rudy Gevaert [mailto:Rudy.Gevaert@UGent.be] Sent: vrijdag 30 januari 2009 8:43 To: Stream Service Cc: 'Shaun Ewing'; mirrors@php.net Subject: Re: setting up mirror not in documentroot Hello Shaun and Marc, > -----Original Message----- > From: Shaun Ewing [mailto:s.ewing@aussiehq.com.au] > You might be able to setup an internal PHP mirror using that method. You > won't be able to setup an official PHP mirror though, as that requires a > virtualhost. Stream Service wrote: > Hello Shaun and Rudy, > > For the record: > A dedicated or virtual private server will also work for a mirror no > virtualhost is needed in this case (depending on the webserver you use and > how it is configured). > > If you use Apache 2 and have root access but just don't understand the > virtualhost options: just ask and I will give you a config that is ready to > be used. Each php file on the mirror has e.e. include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc'; My DocumentRoot points to /var/www. But the mirror is located in /home/rgevaert/WWW/php/ I can't find a way to override the $_SERVER['DOCUMENT_ROOT'] unless I - change the apache config (unfortunately not an option) - change each php page of the mirror, and that will break my rsync update. I can understand that the PHP website is not build for my situation, :), but I would appreciate any help, of you know how I can change this. TIA Rudy -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Rudy Gevaert Rudy.Gevaert@UGent.be tel:+32 9 264 4734 Directie ICT, afd. Infrastructuur ICT Department, Infrastructure office Groep Systemen Systems group Universiteit Gent Ghent University Krijgslaan 281, gebouw S9, 9000 Gent, Belgie www.UGent.be -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Hello Rudy, You could prepend a PHP-file. In this file you can override the $_SERVER['DOCUMENT_ROOT']. The file could look like this: <?php $_SERVER['DOCUMENT_ROOT'] = "/home/rgevaert/WWW/php"; ?> After this $_SERVER['DOCUMENT_ROOT'] would point to /home/rgevaert/WWW/php. With kind regards, Mark Scholten Stream Service - www.streamservice.nl Supporting PHP.net (nl.php.net) and Freenode (grisham.freenode.net)

« previous php.mirrors (#37012) next »