Quicklinks

Fremdprodukte

Linux-PC

Migration-Probl.

Themen

Rootserver

Testpoint

pmwiki

SPIP

Versuch Nr.2

[ ]Styles, bei unterschiedlichem Aufruf (urls).

Basis-Inst:
/var/www/tools/spip203/spip
http://80.74.143.185/tools/spip203/spip/
http://wprj.net/tools/spip203/spip/spip.php

neue Installation
/var/www//spip_multi/eventcal

Test-URL/Domain (hostfile: 80.74.143.185 spipmulti.net)
http://spipmulti.net/


erste Versuche, Notizen

Mehrere SPIP betreiben mit einer Installation:
http://www.spip.net/en_article3581.html - Multi-site provisioning with a shared SPIP kernel
http://www.spip-contrib.net/Un-noyau-SPIP-1-9-plusieurs-sites
http://trac.rezo.net/trac/spip/ticket/186
Für SPIP 1.72:
http://www.spip-contrib.net/Spip-Clone-Gestion-de-sites-en
Für SPIP 1.6:
http://www.spip-contrib.net/MultiSpip-creez-des-sites-Spip-en

Interne Site
http://www.spip.net/ecrire/?exec=articles&id_article=3409

URL:
var/www/spip Hauptinstallation
var/www/comores comores.ch -> vhost: www.comores.ch (PC: Hosteintrag)

# www.comores.ch 
#Hosteintrag: 
#80.74.143.185    www.comores.ch  (Testfall)
#80.74.143.185    comores.ch      (Arbeitet normal mit der Installation)


<?php
#File:
# /var/www/spip/ecrire/mes_options.php 
#
# im Falle des VHOST sollen dessen private Dateien verwendet werden.
#
# kommt nicht ins Redaktionsmenü 
# Squelettes werden erkannt, DB-Inhalt "ok" (andere Installation)
# "privates" mes_options.php Pfad scheint zu stimmen, wird nicht ausgeführt (Fehler darin) 
#
#  ohne if: wird wie erwartet die andere Installation ausgeführt, einloggen geht auch

if ($_SERVER["SERVER_NAME"] == "www.comores.ch") {
#              echo ($_SERVER["SERVER_NAME"]);
#		 echo("$f-{$r[1]}");
               $cookie_prefix = $table_prefix = "spip";
               $f = "/var/www/comores/";       
               define('_SPIP_PATH', '/' . $table_prefix  . '/:./:dist/:formulaires/:ecrire/');
               define('_DIR_IMG', $f.'IMG/');
               define('_DIR_DOC', _DIR_IMG);
               define('_DIR_CACHE', $f.'CACHE/');
               define('_DIR_SESSIONS', $f.'data/');
               define('_DIR_TRANSFERT', $f.'upload');
               define('_FILE_CONNECT_INS', $f.'inc_connect');
#              echo  (_FILE_CONNECT_INS);

               $GLOBALS['dossier_squelettes'] = $f.'squelettes';  /* ok*/

               if (is_readable($f .= 'mes_options.php')) {
                 echo("$f");  /* scheint o.k. */
                 require($f);  /* wird gefunden, aber nicht aufgeführt */
               }
               /* test 
                 else require($f);  /* gibt fehler, wenn nicht gefunden */
               */  

#echo($_SERVER['REQUEST_URI']);
#echo("{$_SERVER['REQUEST_URI']}-$r[1]-$f");

}

$forcer_lang=true;


?>


<VirtualHost *>

	ServerAdmin patrick.ogay@basel-inside.ch
	ServerName www.comores.ch
	ServerAlias comores.ch comores.CH w.comores.CH
	DocumentRoot /var/www/comores

# AuthConfig .htaccess erlauben, i.a. nur für Tests erlauben
       Alias /spip /var/www/spip
	<Directory /var/www/spip/>
              Options Indexes
		Options None
#		AllowOverride FileInfo AuthConfig Limit
#		AllowOverride None
		Order deny,allow
		allow from all
	</Directory>


	<Directory />
		Options None
#		AllowOverride FileInfo AuthConfig Limit
#		AllowOverride None
		Order deny,allow
		Deny from all   
	</Directory>
	<Directory /var/www/comores/>
#		Redirect permanent / http://www.site-geschlossen.ch/
		Options None Includes 
                Options Indexes FollowSymLinks
		AllowOverride AuthConfig   
		Order allow,deny
		Allow from all
# -->  URL wird auf die SPIP-Installation forgewarded o.k. 
              RewriteEngine On
		RewriteBase /
		RewriteRule ^(.*) /spip/$1 [QSA,L]
		# This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
		# RedirectMatch ^/$ /comores/
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options ExecCGI -MultiViews +SymLinksIfOwnerMatch -Includes
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined
	ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Beispiel für mes_optons.php aus Ticket 186

if ( preg_match(',/([a-zA-Z0-9_-]*)[/?],',$_SERVER['REQUEST_URI'],$r)) {
	if (is_dir($e = _DIR_RACINE . 'Ajouts/' . $r[1]. '/')) {
		$cookie_prefix = $table_prefix = $r[1];
		define('_SPIP_PATH', 
		       _DIR_RACINE . 'Ajouts/' . $table_prefix  . '/:' .
		       _DIR_RACINE .'dist/:' .
		       _DIR_RACINE .'formulaires/:' .
		       _DIR_RESTREINT);
		spip_initialisation_parametree($e, $e) ;
		if (is_readable($e .= 'mes_options.php')) include($e);
	}
 }

Edit Page - Page History - Printable View - Aktuelle Änderungen - WikiHelp - SearchWiki
Page last modified on 09.03.2009 12:50 Uhr, visited:324