<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://gwiki3.thatlinuxbox.com/index.php?action=history&amp;feed=atom&amp;title=Multi-Site_Setup</id>
		<title>Multi-Site Setup - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://gwiki3.thatlinuxbox.com/index.php?action=history&amp;feed=atom&amp;title=Multi-Site_Setup"/>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Multi-Site_Setup&amp;action=history"/>
		<updated>2026-04-06T06:58:12Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.5</generator>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Multi-Site_Setup&amp;diff=5903&amp;oldid=prev</id>
		<title>Cordiste: /* siteconfig.php */ Allow siteconfig to each site</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Multi-Site_Setup&amp;diff=5903&amp;oldid=prev"/>
				<updated>2010-11-08T21:43:30Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;siteconfig.php: &lt;/span&gt; Allow siteconfig to each site&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:43, 8 November 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l52&quot; &gt;Line 52:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 52:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== siteconfig.php ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== siteconfig.php ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The information &lt;/del&gt;from the &amp;lt;tt&amp;gt;siteconfig.php&amp;lt;/tt&amp;gt; file &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;will &lt;/del&gt;be &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the same &lt;/del&gt;for &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;all your sites. The only setting of interest in this file is the &amp;lt;code&amp;gt;$_CONF['default_charset']&amp;lt;/code&amp;gt;. Effectively, you will have to run all of your sites with the same character set. This should not be a problem if you use UTF-8. If you can guarantee that all your sites are using the same language, you could also use another character set here. Plan ahead, though, since changing this later will be a lot of work&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;As in the db-config.php file, the informations &lt;/ins&gt;from the &amp;lt;tt&amp;gt;siteconfig.php&amp;lt;/tt&amp;gt; file &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;can &lt;/ins&gt;be &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;different &lt;/ins&gt;for &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;each site&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if ($_SERVER['HTTP_HOST'] == 'example1.com') {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; // To disable your site1 quickly, simply set this flag to false&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; $_CONF['site_enabled'] = true;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; $_CONF_FCK['imagelibrary'] = '/images/library_site1';&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; $_CONF['default_charset'] = 'utf-8';&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;} else if ($_SERVER['HTTP_HOST'] == 'example2.com) {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; // To disable your site2 quickly, simply set this flag to false&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; $_CONF['site_enabled'] = true;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; $_CONF_FCK['imagelibrary'] = '/images/library_site2';&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; $_CONF['default_charset'] = 'utf-8';&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;} else if ($_SERVER['HTTP_HOST'] == 'example3.com) {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; // To disable your site2 quickly, simply set this flag to false&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; $_CONF['site_enabled'] = false;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; $_CONF_FCK['imagelibrary'] = '/images/library_site3';&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; $_CONF['default_charset'] = 'utf-8';&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Limitations and Workarounds ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Limitations and Workarounds ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cordiste</name></author>	</entry>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Multi-Site_Setup&amp;diff=5825&amp;oldid=prev</id>
		<title>Dirk: Clarified sitemap.xml limitations</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Multi-Site_Setup&amp;diff=5825&amp;oldid=prev"/>
				<updated>2010-05-24T08:36:37Z</updated>
		
		<summary type="html">&lt;p&gt;Clarified sitemap.xml limitations&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:36, 24 May 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l69&quot; &gt;Line 69:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 69:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Plugins share all of their files with all of the sites. This may cause problems when the plugin stores files in fixed locations (e.g. configuration information that needs to be different for different sites).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Plugins share all of their files with all of the sites. This may cause problems when the plugin stores files in fixed locations (e.g. configuration information that needs to be different for different sites).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Of the plugins that ship with Geeklog, the [[XMLSitemap Plugin]] needs a special setup: The default name for the sitemap file is &amp;lt;tt&amp;gt;sitemap.xml&amp;lt;/tt&amp;gt; and would be used by all the sites which would obviously cause confusion. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;To the &lt;/del&gt;the XMLSitemap section in the Configuration and make sure you use a different file name for each site. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(TBD: How do &lt;/del&gt;you &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tell &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;search engine which sitemap belongs &lt;/del&gt;to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which &lt;/del&gt;site&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;?)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;==== sitemap.xml ====&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Of the plugins that ship with Geeklog, the [[XMLSitemap Plugin]] needs a special setup: The default name for the sitemap file is &amp;lt;tt&amp;gt;sitemap.xml&amp;lt;/tt&amp;gt; and would be used by all the sites which would obviously cause confusion. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Go to &lt;/ins&gt;the XMLSitemap section in the Configuration and make sure you use a different file name for each site.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Note that due to the fact that all your sites share a single [[Multi-Site Setup#robots.txt|robots.txt]] &lt;/ins&gt;you &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;can ''not'' add &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sitemaps to your &amp;lt;tt&amp;gt;robots.txt&amp;lt;/tt&amp;gt; file. Instead, you will have &lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;submit them manually for each &lt;/ins&gt;site&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, e.g. via the [https://www.google.com/webmasters/tools/ Google Webmaster Tools].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Themes ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Themes ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dirk</name></author>	</entry>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Multi-Site_Setup&amp;diff=5823&amp;oldid=prev</id>
		<title>Dirk: Multi-Site Setup</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Multi-Site_Setup&amp;diff=5823&amp;oldid=prev"/>
				<updated>2010-05-24T07:38:47Z</updated>
		
		<summary type="html">&lt;p&gt;Multi-Site Setup&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== What is it? ==&lt;br /&gt;
&lt;br /&gt;
With only a small modification, Geeklog can be used to run several websites off of one code base, i.e. you only need one physical set of files to run more than one Geeklog site.&lt;br /&gt;
&lt;br /&gt;
Please note that this setup does have some drawbacks and limitations (discussed below) and is not officially supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
Since (almost) all the configuration information is held in the database, we only need to make sure that Geeklog picks the correct database for the site it's supposed to display. The trick is that the global PHP variable &amp;lt;code&amp;gt;$_SERVER['HTTP_HOST']&amp;lt;/code&amp;gt; contains, effectively, the domain name that the visitor used to call up the site. So we modify &amp;lt;tt&amp;gt;db-config.php&amp;lt;/tt&amp;gt; like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (strpos($_SERVER['HTTP_HOST'], 'example.com') !== false) {&lt;br /&gt;
    $_DB_host = 'localhost';&lt;br /&gt;
    $_DB_name = 'database1';&lt;br /&gt;
    $_DB_user = 'dbuser1';&lt;br /&gt;
    $_DB_pass = 'password1';&lt;br /&gt;
    $_DB_table_prefix = 'ex1_';&lt;br /&gt;
} else {&lt;br /&gt;
    $_DB_host = 'localhost';&lt;br /&gt;
    $_DB_name = 'database2';&lt;br /&gt;
    $_DB_user = 'dbuser2';&lt;br /&gt;
    $_DB_pass = 'password2';&lt;br /&gt;
    $_DB_table_prefix = 'ex2_';&lt;br /&gt;
}&lt;br /&gt;
$_DB_dbms = 'mysql';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add additional &amp;lt;code&amp;gt;elseif&amp;lt;/code&amp;gt; sections for every additional site that you want to support.&lt;br /&gt;
&lt;br /&gt;
=== Tweaks ===&lt;br /&gt;
Minor tweaks:&lt;br /&gt;
* If all databases are using the same host, you only need to list the &amp;lt;code&amp;gt;$_DB_host&amp;lt;/code&amp;gt; variable once.&lt;br /&gt;
* If all sites use their own database, they could also all use the same table prefix, which would also be listed only once then.&lt;br /&gt;
* If you want to run sites with different DBMS (e.g. one site running on Postgres, while others are on MySQL), you would need to move the &amp;lt;code&amp;gt;$_DB_dbms&amp;lt;/code&amp;gt; into the if/else construct.&lt;br /&gt;
&lt;br /&gt;
=== Domain Name ===&lt;br /&gt;
&lt;br /&gt;
Note that we're using &amp;lt;code&amp;gt;strpos&amp;lt;/code&amp;gt; to check for the domain name. This is so that we can both accept &amp;lt;tt&amp;gt;www.example.com&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;example.com&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You may want to set up a &amp;lt;tt&amp;gt;.htaccess&amp;lt;/tt&amp;gt; rule so that your site always uses the same form, despite what the user enters. For example, if you prefer the form &amp;lt;tt&amp;gt;www.example.com&amp;lt;/tt&amp;gt; over others, you can add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
&lt;br /&gt;
RewriteCond %{HTTP_HOST} example.com [NC]&lt;br /&gt;
RewriteRule (.*) http://www.example.com/$1 [L,R]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to your &amp;lt;tt&amp;gt;.htaccess&amp;lt;/tt&amp;gt; to redirect &amp;lt;nowiki&amp;gt;http://example.com/&amp;lt;/nowiki&amp;gt; to &amp;lt;nowiki&amp;gt;http://www.example.com/&amp;lt;/nowiki&amp;gt;. That redirect happens before the above code in your &amp;lt;tt&amp;gt;db-config.php&amp;lt;/tt&amp;gt; is executed, i.e. the code will only see the &amp;quot;www&amp;quot; form then.&lt;br /&gt;
&lt;br /&gt;
=== siteconfig.php ===&lt;br /&gt;
&lt;br /&gt;
The information from the &amp;lt;tt&amp;gt;siteconfig.php&amp;lt;/tt&amp;gt; file will be the same for all your sites. The only setting of interest in this file is the &amp;lt;code&amp;gt;$_CONF['default_charset']&amp;lt;/code&amp;gt;. Effectively, you will have to run all of your sites with the same character set. This should not be a problem if you use UTF-8. If you can guarantee that all your sites are using the same language, you could also use another character set here. Plan ahead, though, since changing this later will be a lot of work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Limitations and Workarounds ==&lt;br /&gt;
&lt;br /&gt;
The main advantage of this setup is also its main limitation: All the resources are shared between sites. This is what we want for the source code, but it also happens for other files. This can be worked around in some cases but not in all of them.&lt;br /&gt;
&lt;br /&gt;
=== Installation and Upgrades ===&lt;br /&gt;
&lt;br /&gt;
Please note that Geeklog's install script is not aware of this hack and will only be able to install or upgrade one site at a time. This makes upgrades especially awkward, as you have to take all the sites down at the same time and then upgrade them one after the other (using temporary copies of &amp;lt;tt&amp;gt;db-config.php&amp;lt;/tt&amp;gt;, since the install script will modify it).&lt;br /&gt;
&lt;br /&gt;
=== Plugins ===&lt;br /&gt;
&lt;br /&gt;
All plugins will be available to all the sites. This does not mean, however, that they need to be installed for all of them. You can install, say, the Forum plugin for one site only. Just keep in mind that it will show up as an uninstalled plugin for all the other sites.&lt;br /&gt;
&lt;br /&gt;
Plugins share all of their files with all of the sites. This may cause problems when the plugin stores files in fixed locations (e.g. configuration information that needs to be different for different sites).&lt;br /&gt;
&lt;br /&gt;
Of the plugins that ship with Geeklog, the [[XMLSitemap Plugin]] needs a special setup: The default name for the sitemap file is &amp;lt;tt&amp;gt;sitemap.xml&amp;lt;/tt&amp;gt; and would be used by all the sites which would obviously cause confusion. To the the XMLSitemap section in the Configuration and make sure you use a different file name for each site. (TBD: How do you tell the search engine which sitemap belongs to which site?)&lt;br /&gt;
&lt;br /&gt;
=== Themes ===&lt;br /&gt;
&lt;br /&gt;
Like any other resource, all themes are also available for each site. This may not be a problem if you're using a distinct theme for each site anyway and don't let your users change their theme. Otherwise, you may need to change the [http://www.geeklog.net/docs/english/config.html#desc_path_themes Themes Path] in the Configuration of each site.&lt;br /&gt;
&lt;br /&gt;
==== Favicon ====&lt;br /&gt;
&lt;br /&gt;
Related to the theme: You probably want to use different [http://en.wikipedia.org/wiki/Favicon Favicons] for your sites. Since some browsers are looking for a file called &amp;lt;tt&amp;gt;favicon.ico&amp;lt;/tt&amp;gt; by default, you should make sure ''not'' to have a file of that name. Instead, modify the &amp;lt;tt&amp;gt;header.thtml&amp;lt;/tt&amp;gt; of your site's theme to point to a favicon with a unique name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;link rel=&amp;quot;SHORTCUT ICON&amp;quot; href=&amp;quot;{site_url}/mysite.ico&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Images ===&lt;br /&gt;
&lt;br /&gt;
Geeklog's &amp;lt;tt&amp;gt;images&amp;lt;/tt&amp;gt; directory is shared. This may cause problems especially with the user photos (if you allow those). You can disable uploading of user photos and/or switch to using [http://www.geeklog.net/docs/english/config.html#desc_use_gravatar Gravatar].&lt;br /&gt;
&lt;br /&gt;
As long as you make sure not to re-use story IDs, all article images could be left in the same directory. If you can not guarantee that, you may want to separate the images directories (again, in the Configuration). Please note that this will also affect user photos and topic icons.&lt;br /&gt;
&lt;br /&gt;
=== robots.txt ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;robots.txt&amp;lt;/tt&amp;gt; has a fixed file name and will have to be shared between all sites. Keep that in mind when adding entries.&lt;br /&gt;
&lt;br /&gt;
(In theory, it should be possible to set up the server to create the &amp;lt;tt&amp;gt;robots.txt&amp;lt;/tt&amp;gt; dynamically. Not sure if that's worth the effort and it will most likely affect all &amp;lt;tt&amp;gt;.txt&amp;lt;/tt&amp;gt; files on the server.)&lt;br /&gt;
&lt;br /&gt;
=== .htaccess ===&lt;br /&gt;
&lt;br /&gt;
Unless you can tweak you webserver's setup, the &amp;lt;tt&amp;gt;.htaccess&amp;lt;/tt&amp;gt; will also have to be shared between sites. Keep that in mind when adding redirects or deny rules.&lt;/div&gt;</summary>
		<author><name>Dirk</name></author>	</entry>

	</feed>