From: soshea <so...@si...> - 2003-06-24 02:53:50
|
There is just no stopping you! Excellent work, this is something I will want to do in the future!! Well Done, I am impressed! Kind Regard Steve -----Original Message----- From: tik...@li... [mailto:tik...@li...]On Behalf Of mose Sent: Tuesday, June 24, 2003 12:19 PM To: tik...@li... Subject: [Tikiwiki-devel] Tikiwiki virtual hosting yo After a discussion with Lorinc and Marc http://feu.org/IrcTiki20030622 I had an eye on virtual hosting of tikiwiki and found out that it was really easy to set up, with some line changes in Smarty/Smarty.class.php, tiki-setup.php and tiki-admin_modules.php (and some others). The idea is to introduce a variable $tikidomain that forks a new subdir in modules/cache/ and in templates_c/, with default empty value that would not interfere with not-multidomain settings... I'm testing it right now, and is it works, and if useful, I can submit it on cvs. I give detailed setup procedure at http://feu.org/TikiWikiVirtualHosting I just modifed the source for virtual hosting enable for all the tikis I need. Here is how I preceeded (waiting ofr more writing efforts for a decent documentation). let's host 3 domains feu.org is a community website localis.org is a developpers website cynt.org is a personnal website I setup 3 databases, dumping content from db/tiki.sql and db/tiki_1.6-1.7.sql call them tiki_feu, tiki_localis and tiki_cynt now here is my virtualhost settings (I striped rewrite rules stuff that you can find elsewhere) <VirtualHost 80.67.179.82> ServerName feu.org DocumentRoot /usr/local/tikiwiki ErrorLog /var/log/apache/feu.org-error_log Customlog /var/log/apache/feu.org-access_log combined php_flag magic_quotes_gpc Off php_value "include_path" ".:lib:lib/pear:/usr/share/pear" <FilesMatch "\.(bak|inc|lib|sh|sql|tpl)$"> order deny,allow deny from all </FilesMatch> <FilesMatch "^\.#"> order deny,allow deny from all </FilesMatch> </VirtualHost> <VirtualHost 80.67.179.82> ServerName localis.org DocumentRoot /usr/local/tikiwiki ErrorLog /var/log/apache/localis.org-error_log Customlog /var/log/apache/localis.org-access_log combined php_flag magic_quotes_gpc Off php_value "include_path" ".:lib:lib/pear:/usr/share/pear" <FilesMatch "\.(bak|inc|lib|sh|sql|tpl)$"> order deny,allow deny from all </FilesMatch> <FilesMatch "^\.#"> order deny,allow deny from all </FilesMatch> </VirtualHost> <VirtualHost 80.67.179.82> ServerName cynt.org DocumentRoot /usr/local/tikiwiki ErrorLog /var/log/apache/cynt.org-error_log Customlog /var/log/apache/cynt.org-access_log combined php_flag magic_quotes_gpc Off php_value "include_path" ".:lib:lib/pear:/usr/share/pear" <FilesMatch "\.(bak|inc|lib|sh|sql|tpl)$"> order deny,allow deny from all </FilesMatch> <FilesMatch "^\.#"> order deny,allow deny from all </FilesMatch> </VirtualHost> then I create some more cache directories: mkdir template_c/feu mkdir template_c/localis mkdir template_c/cynt mkdir modules/cache/feu mkdir modules/cache/localis mkdir modules/cache/cynt chown -R www-data:mose template_c modules/cache Now setup the conf for tikiwikis: edit file /usr/local/tikiwiki/db/local.php (there are some commented tips in file db/tiki-db.php) and put something like that (adapt it to your context): <?php $host_tiki = 'localhost'; $user_tiki = 'tiki'; $pass_tiki = 'tiki'; if ($_SERVER["HTTP_HOST"] == "localis.org") { $dbs_tiki = 'tiki_localis'; $tikidomain = 'localis'; } elseif ($_SERVER['SERVER_NAME'] == "feu.org") { $dbs_tiki = 'tiki_feu'; $tikidomain = 'feu'; } elseif ($_SERVER['SERVER_NAME'] == "cynt.org") { $dbs_tiki = 'tiki_cynt'; $tikidomain = 'cynt'; } ?> here is done. for my own convenience I also setup a directory local/ with one subdir for each domain for disk storage of contents (set in admin panels). Templates are common, one theme per site is maybe the right solution. Here is it. any suggestion is welcome, and bugfixes are enjoyed ! regards, mose ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Tikiwiki-devel mailing list Tik...@li... https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel |