RE: setting up mirror not in documentroot
[email protected] ("Stream Service")
| Newsgroups | php.mirrors |
|---|---|
| Message-ID | <000901c982c8$d0bf7c50$723e74f0$@nl> |
-----Original Message----- From: Rudy Gevaert [mailto:[email protected]] Sent: vrijdag 30 januari 2009 8:43 To: Stream Service Cc: 'Shaun Ewing'; [email protected] Subject: Re: setting up mirror not in documentroot Hello Shaun and Marc, > -----Original Message----- > From: Shaun Ewing [mailto:[email protected]] > 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 [email protected] 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)