create an SPIP Farm using mutualisation
Martín Gaitán <
gaitan@...>
2009-03-01 21:51:24 GMT
On Thu, Feb 26, 2009 at 4:09 AM, Martín Gaitán <gaitan <at> gmail.com> wrote:
>>
>> Another option exists and may be easier to maintain :
>> it's using one installation of SPIP for several websites.
>> (a plugin makes it really easy
>> : http://www.spip-contrib.net/La-mutualisation-facile )
>>
>> .Gilles
>
> I've tried the mutualization and I must say it works as a charm. I think I
> gonna implement it on my futures sites.
>
> http://granja.nqnwebs.com
> http://granja2.nqnwebs.com
>
> Both are over the same shared spip core. Great!
>
> Now a question: How I could mutualize site under a subdirectory of a root
> site?
>
> for example:
> myspip.com/spip1
> myspip.com/spip2
> myspip.com/anotherspip
>
> thanks.
> Martin
I've sent this mail a few days ago, but just to Gilles (I did the
"reply" mistake).
I'm trying to do a 'public spip farm' using mutualisation. Users could
register an get your own spip (with commons plugins an squelettes) to
use as blog or whatever.
My problem is that I can't create a subdomain for each new site (I
need to it manually on my hosting), although I could create a simbolic
link automaticly that call the directory where the mutualized spip is
installed. These look like directories for a domain.
http://myspip.com/spip1
http://myspip.com/spip2
and so on...
When I try to install a mutualized spip from a subdirectory, the
Mutualization plugin recognize just the domain, because it uses
$_SERVER['HTTP_HOST'] to know which site the user want to create or visit.
So, I want to hack it to give support to subdirectories, but I failed
with my attemps. The idea is read the full URL (domain + subdirectory)
and replace "/" by "-" to convert it to a valid name for spip.
For example
I replace
$site = str_replace('www.', '', $_SERVER['HTTP_HOST']);
by
$site = str_replace('www.', '', $_SERVER['SCRIPT_URI']);
$site = str_replace('http://', '', $site);
$site = substr($site, 0, -1);
$site = str_replace('/', '-', $site);
If I call it from http://nqnwebs.com/newsite by default mutualization
try to create 'sites/nqnwebs.com' but with this hack it's
'sites/nqnwebs.com-newsite' that it's a valid directory.
The problem, of course, is then it fail with redirectioning.
Well, any help will be very appreciated for me, and if it works, for
future spip users.
thanks
martin
_______________________________________________
spip-en <at> rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en