<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GLOBAL9 NETWORK &#187; window</title>
	<atom:link href="http://www.global9.net/tag/window/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.global9.net</link>
	<description>Freelancer WEB Hosting Provider</description>
	<lastBuildDate>Fri, 20 Jan 2012 20:15:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Setup Drupal on Localhost and multiple sites</title>
		<link>http://www.global9.net/2009/08/setup-drupal-on-localhost-and-multiple-sites/</link>
		<comments>http://www.global9.net/2009/08/setup-drupal-on-localhost-and-multiple-sites/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 20:09:41 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[TUTORIAL and HOW TO]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[localhost]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://www.global9.net/?p=158</guid>
		<description><![CDATA[Preparation We assumes that you have PHP, Apache, MySQL and Drupal all installed and working and have a MySQL admin tool available the free community edition of  MYSQL GUI TOOLS will do nicely, or you can use phpMyAdmin if you prefer. Again, I&#8217;ll assume you&#8217;ve got one of these installed and connected to your database [...]]]></description>
			<content:encoded><![CDATA[<h2>Preparation</h2>
<p>We assumes that you have PHP, Apache, MySQL and Drupal all installed and working and have a MySQL admin tool available the free community edition of  <a title="MySQL GUI Tools" href="http://dev.mysql.com/downloads/gui-tools/index.html" target="_blank">MYSQL GUI TOOLS</a> will do nicely, or you can use <a href="http://www.phpmyadmin.net/" rel="nofollow">phpMyAdmin</a> if you prefer. Again, I&#8217;ll assume you&#8217;ve got one of these installed and connected to your database server.</p>
<p>If you don&#8217;t yet have PHP, Apache and MySQL installed then<a href="http://www.apachefriends.org/en/xampp-windows.html" rel="nofollow"> XAMPP</a> will help! See also <a title="http://drupal.org/node/161975" href="http://drupal.org/node/161975" rel="nofollow">http://drupal.org/node/161975</a></p>
<p>Finally, I&#8217;ll assume you&#8217;re starting with a working D6.x installation, have followed the installation instructions and got the default site up and running. If not, start here <a title="http://drupal.org/getting-started/install" href="http://drupal.org/getting-started/install" rel="nofollow">http://drupal.org/getting-started/install</a>.</p>
<h2>Multi-site setup on localhost</h2>
<p>Set up multi-sites there are four stages to go through, but it&#8217;s not difficult:</p>
<ol>
<li>Set up your databases, one for each website</li>
<li>Set up each site in Drupal</li>
<li>Edit the virtual host settings in Apache</li>
<li>Update the Windows hosts file</li>
</ol>
<p>In the following example we will add a local site&#8221;http://develsite1&#8243; in addition to the default site.</p>
<p>We&#8217;ll assume Drupal is installed in c:/www ( and that your web root is set to c:/www in the apache config file, apache\conf\httpd.conf ).</p>
<h2>1. Databases</h2>
<p>Firstly we will set up a new database for &#8216;develsite1&#8242;</p>
<ol>
<li>Use <strong>GUI Tools MYSQL Browser</strong> and log into your DB server at <strong>localhost</strong>.</li>
<li>Ctrl+D to create a new database. Type a name for your database in the &#8216;create database&#8217; textbox ( &#8216;develsite1&#8242; is as good as anything ) then click the create button. A new database outline will be added.</li>
<li>Repeat for each additional site you want to set up.</li>
</ol>
<h2>2. Drupal</h2>
<ol>
<li>Create a new folder /sites/develsite1. i.e. you should now have two folders in your drupal sites folder,<br />
<span style="color: #ff0000;">default </span>and <span style="color: #ff0000;">develsite1</span>.</li>
<li>Make sure the folder /sites/default contains an unmodified copy of the file <span style="color: #ff0000;">default.settings.php</span>. The installer script will look for this file when installing your new site and the install will fail if it ain&#8217;t there. If necessary, extract a copy from the drupal install package.</li>
<li>Also place a copy default.settings.php in the testsite1 folder and rename it <span style="color: #ff0000;">settings.php</span>. Make sure the file is writeable (i.e. the &#8216;read only&#8217; attribute is not set) because Drupal will modify this file as part of the installation process.</li>
</ol>
<h2>3. Apache</h2>
<p>1. Open the apache config file &#8216;\apache\conf\extra\<strong>httpd-vhosts.conf</strong>&#8216;.</p>
<p>2. Scroll to the end of the file, where you will find the virtual hosting setup. Assuming your websites are all located in the folder c:/www then add the following lines (edit the paths as necessary)</p>
<div class="codeblock"><span style="color: #ff0000;"><code>##</code></span><code>NameVirtualHost *:80</code><code> -&gt; </code><code>NameVirtualHost *:80 (<span style="color: #ff9900;">Remove <strong><span style="color: #ff0000;">##</span></strong> tag</span>)</code></div>
<div class="codeblock"></div>
<div class="codeblock"><code>NameVirtualHost *:80</code></div>
<div class="codeblock">
<p>&lt;VirtualHost *:80&gt;<br />
DocumentRoot c:/www/<br />
ServerName localhost<br />
&lt;/VirtualHost&gt;</p>
<p>&lt;VirtualHost *:80&gt;<br />
DocumentRoot c:/www/drupal6<br />
ServerName develsite1<br />
&lt;/VirtualHost&gt;</p>
</div>
<p>There are lots of other things you can add into your VHost settings &#8211; see the <a href="http://httpd.apache.org/docs/2.2/vhosts/" rel="nofollow">Apache documentation</a>.</p>
<h2>4. Windows</h2>
<p>We now need to tell Windows that the domain &#8216;develsite1&#8242; is hosted locally, i.e. not to look on the Internet for it. Open the &#8216;<strong>hosts</strong>&#8216; file with notepad. It can usually be found in c:/windows/system32/drivers/etc</p>
<p>Edit the end of the file to read:</p>
<div class="codeblock"><code>127.0.0.1 localhost<br />
127.0.0.1 testsite1</code></div>
<p>Save the file.</p>
<p>When working offline -without any Internet connection- with a local test site, the Windows service <em>DNS Client</em> (see <em>Control Panel -&gt; Administrative Tools -&gt; Services</em>) can be necessary to read and parse the <em>hosts</em> file. This is optional when the PC is online.</p>
<h2>Apache, again</h2>
<p>OK, that&#8217;s (almost) it. All that is left is to restart the Apache webserver.<br />
You could reboot your computer but a better way is to open a command prompt window and type &#8216;net stop apache&#8217;. When the service has stopped, restart it using &#8216;net start apache&#8217;. If you&#8217;re using XAMPP then use &#8216;xampp stop&#8217; and &#8216;xampp start&#8217;.</p>
<p>Now when you open your favourite browser and enter &#8216;http://develsite1&#8242; you should see the installation page for your new Drupal site. Enter the database details you created earlier and let the installer script set up the tables for you.</p>
<p>You can add as many sites as you need by following the process above.</p>
<h3>Optional additional configuration</h3>
<p>Although not essential, here are some things to help keep things tidy in a multi-site setup.</p>
<h4>Use a separate files folder for each site</h4>
<p>By default, all images and other uploaded files are kept in a single folder. Whilst this works, its a bit messy and better to set up a separate files folder for each site.</p>
<ul>
<li>Set up a separate &#8216;files&#8217; and &#8216;files/tmp&#8217; folders by creating the folders in your sites directory, i.e. sites/develsite1/files and sites/develsite1/files/tmp,<br />
sites/develsite1/files,<br />
sites/develsite2/files/tmp etc.</li>
<li>Update the settings for each site by visiting &#8216;admin/file system&#8217; and changing the path for the files and temp folders to<br />
sites/develsite1/files,<br />
sites/develsite2/files/tmp&#8230;etc.</li>
</ul>
<h4>Consider the best place to install modules and themes</h4>
<ul>
<li>If you have modules or themes that you want to share between all sites then store them in sites/all/modules and sites/all/themes respectively.</li>
<li>If you want them to be available only to one site then store them in sites/develsite1/modules and sites/develsite1/themes (replacing &#8216;testsite1&#8242; with your actual site name)</li>
</ul>
<p>Just it,.. simplicity is beautifull&#8230; ayess..</p>
<p>Re-Edit from : http://drupal.org/node/32715</p>
<p>For complete tutorial you can read in my personal blok at <a title="belida.com" href="http://www.belida.com/drupal">http://www.belida.com/drupal</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.global9.net/2009/08/setup-drupal-on-localhost-and-multiple-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

