Remote Hosting on normal webspace

Events happening in the community are now at Drupal community events on www.drupal.org.
spamwelle's picture

Hi,

i just installed aegir and must say that it is a great tool.

The main server is running smoothly and adding new sites works very well.

For example: web1.myserver.com, web2.myserver.com...

Now I want to make some of these sites available on some of my other webservers and also small webspace-packets without root-access. So installing another copy of aegir will not work.

To get this working, I started a solution with php and curl. The script laods the original url and outposts it to the new one. Unfortenatly there are still some errors in my script. Not all of the pages are accessible and pictures are only working in Internet Explorer. Can anyone have a look at it and give me some hints?

Code for the index.php on remote site:


$original_url = "http://web1.myserver.com/".htmlspecialchars($_SERVER[REQUEST_URI])."";

// initialize CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$original_url);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);

$html= curl_exec($ch);
if (!$html) {
// Message on Error - Status 503
header('HTTP/1.1 503 Service Unavailable');
exit;
}

// Echo Page
echo $html;

Code for the htaccess to redirect the requests:

RewriteEngine on
RewriteRule ^(.).html$ /index.php
RewriteRule ^(.
).htm$ /index.php
RewriteRule ^(.).css$ /index.php
RewriteRule ^(.
).jpg$ /index.php
RewriteRule ^(.*).png$ /index.php

Thanks alot, and yes I know that this is not the best technical solution ;-)

Aegir hosting system

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: