<?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>acloudtree &#187; cakephp</title>
	<atom:link href="http://www.acloudtree.com/category/cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.acloudtree.com</link>
	<description>Programming, Computers, Writing, Economics, and Life</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:03:38 +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>(Nerd) How to: Setup Virtual Hosts on Ubuntu 9.10 using Apache2 + MySQL5.X + PHP5</title>
		<link>http://www.acloudtree.com/nerd-how-to-setup-virtual-hosts-on-ubuntu-9-10-using-apache2-mysql5-x-php5/</link>
		<comments>http://www.acloudtree.com/nerd-how-to-setup-virtual-hosts-on-ubuntu-9-10-using-apache2-mysql5-x-php5/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 21:45:58 +0000</pubDate>
		<dc:creator>jared.folkins</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Nerd]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[VIM]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[virtualhosts]]></category>

		<guid isPermaLink="false">http://www.acloudtree.com/?p=443</guid>
		<description><![CDATA[I have been working on a couple projects that are hosted on gitHub. As the scale and scope of the projects grow, I ended up needing to setup multiple virtual hosts on my development machine. It wasn&#8217;t hard, but the information online that I found was fairly dated, so I created this tutorial. This entire [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on a couple projects that are hosted on gitHub. As the scale and scope of the projects grow, I ended up needing to setup multiple virtual hosts on my development machine. It wasn&#8217;t hard, but the information online that I found was fairly dated, so I created this tutorial.</p>
<p>This entire tutorial is done after entering the &#8216;sudo -i&#8217; command which allows us to act as the SUPER-USER for the entirety of our terminal session. You&#8217;ve been warned.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #660033;">-i</span></pre></div></div>

<p><strong>NOTICE!!! I am aware that we could use the &#8216;a2ensite&#8217; and related commands. But for the sake of understanding the entire process, I will not be using it.</strong></p>
<p>1) Install the required modules from the command line</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2 mysql-server mysql-client php5 php5-cli php5-mysql</pre></div></div>

<p>2) Change the directory to /etc/apache2/sites-available</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-available</pre></div></div>

<p>3) If you run the &#8216;ls&#8217; command while in the sites-available directory you should see the following</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ls</span></pre></div></div>

<p>Output</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">default  default-ssl</pre></div></div>

<p>4) Copy the &#8216;default&#8217; config to a site specific config. For this tutorial I am using dev.acloudtree.com.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> default dev.acloudtree.com.conf</pre></div></div>

<p>5) Make the application directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>dev.acloudtree.com</pre></div></div>

<p>6) Open the file with an editor of your choosing. I prefer VIM.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> dev.acloudtree.com.conf</pre></div></div>

<p>The output below is the entire file but I will discuss certain parts that we will need to edit.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>VirtualHost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">&gt;</span>
        ServerAdmin webmaster<span style="color: #000000; font-weight: bold;">@</span>localhost
&nbsp;
        DocumentRoot <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/&gt;</span>
                Options FollowSymLinks
                AllowOverride None
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/&gt;</span>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
        ScriptAlias <span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/usr/lib/cgi-bin&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
                AllowOverride None
                Options +ExecCGI <span style="color: #660033;">-MultiViews</span> +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
        ErrorLog <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>error.log
&nbsp;
        <span style="color: #666666; font-style: italic;"># Possible values include: debug, info, notice, warn, error, crit,</span>
        <span style="color: #666666; font-style: italic;"># alert, emerg.</span>
        LogLevel warn
&nbsp;
        CustomLog <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>access.log combined
&nbsp;
    Alias <span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #ff0000;">&quot;/usr/share/doc/&quot;</span>
    <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/usr/share/doc/&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0<span style="color: #000000; font-weight: bold;">/</span>255.0.0.0 ::<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">128</span>
    <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;/</span>VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>7) Add the name of the server. This will be the name that you type in the URL field of your web browser (IE: Firefox)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>VirtualHost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">&gt;</span>
        ServerAdmin webmaster<span style="color: #000000; font-weight: bold;">@</span>localhost
	ServerName dev.acloudtree.com
...</pre></div></div>

<p>8 ) Point the Virtual host to the correct directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">...
        DocumentRoot <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>dev.acloudtree.com
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/&gt;</span>
                Options FollowSymLinks
                AllowOverride None
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
...</pre></div></div>

<p>9) Also make the change here.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">...
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>dev.acloudtree.com<span style="color: #000000; font-weight: bold;">/&gt;</span>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
...</pre></div></div>

<p>10) So this is what your dev.acloudtree.com.conf file should look like when you are done. Write/Quite the file and we will move on.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>VirtualHost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">&gt;</span>
        ServerAdmin webmaster<span style="color: #000000; font-weight: bold;">@</span>localhost
	ServerName dev.acloudtree.com
&nbsp;
        DocumentRoot <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>dev.acloudtree.com
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/&gt;</span>
                Options FollowSymLinks
                AllowOverride None
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>dev.acloudtree.com<span style="color: #000000; font-weight: bold;">/&gt;</span>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
        ScriptAlias <span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/usr/lib/cgi-bin&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
                AllowOverride None
                Options +ExecCGI <span style="color: #660033;">-MultiViews</span> +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
        ErrorLog <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>error.log
&nbsp;
        <span style="color: #666666; font-style: italic;"># Possible values include: debug, info, notice, warn, error, crit,</span>
        <span style="color: #666666; font-style: italic;"># alert, emerg.</span>
        LogLevel warn
&nbsp;
        CustomLog <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>access.log combined
&nbsp;
    Alias <span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #ff0000;">&quot;/usr/share/doc/&quot;</span>
    <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/usr/share/doc/&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0<span style="color: #000000; font-weight: bold;">/</span>255.0.0.0 ::<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">128</span>
    <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;/</span>VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>10a) <strong>IMPORTANT!</strong> Make a symbolic link in the sites-enabled directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-available<span style="color: #000000; font-weight: bold;">/</span>dev.acloudtree.com.conf <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-enabled<span style="color: #000000; font-weight: bold;">/</span>000-dev.acloudtree.com.conf</pre></div></div>

<p>11) We need to edit our /etc/hosts file</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>hosts</pre></div></div>

<p>Output</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">127.0.0.1       localhost 
127.0.1.1       servername
&nbsp;
<span style="color: #666666; font-style: italic;"># The following lines are desirable for IPv6 capable hosts</span>
::<span style="color: #000000;">1</span>     localhost ip6-localhost ip6-loopback
fe00::<span style="color: #000000;">0</span> ip6-localnet
ff00::<span style="color: #000000;">0</span> ip6-mcastprefix
ff02::<span style="color: #000000;">1</span> ip6-allnodes
ff02::<span style="color: #000000;">2</span> ip6-allrouters
ff02::<span style="color: #000000;">3</span> ip6-allhosts</pre></div></div>

<p>12) Right beneath the &#8216;localhost&#8217; definition, add the following</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">127.0.0.1      dev.acloudtree.com</pre></div></div>

<p>13) The complete file looks like this.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">127.0.0.1       localhost
127.0.0.1       dev.acloudtree.com
127.0.1.1       servername
&nbsp;
<span style="color: #666666; font-style: italic;"># The following lines are desirable for IPv6 capable hosts</span>
::<span style="color: #000000;">1</span>     localhost ip6-localhost ip6-loopback
fe00::<span style="color: #000000;">0</span> ip6-localnet
ff00::<span style="color: #000000;">0</span> ip6-mcastprefix
ff02::<span style="color: #000000;">1</span> ip6-allnodes
ff02::<span style="color: #000000;">2</span> ip6-allrouters
ff02::<span style="color: #000000;">3</span> ip6-allhosts</pre></div></div>

<p>14) Create an index.php file in /var/dev.acloudtree.com for testing purposes.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>dev.acloudtree.com<span style="color: #000000; font-weight: bold;">/</span>index.php</pre></div></div>

<p>Contents of .php file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Jared Folkins\' tutorial on acloudtree.com really works!'</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">phpinfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>15) Reboot the apache2 process.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>16) Now open up your web browser and enter dev.acloudtree.com into the URL bar and it should work!</p>
<p>UPDATE: I forgot to mention that in this environment, I like to configure log files for each virtual host. This is our current dev.acloudtree.com file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>VirtualHost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">&gt;</span>
        ServerAdmin webmaster<span style="color: #000000; font-weight: bold;">@</span>localhost
	ServerName dev.acloudtree.com
&nbsp;
        DocumentRoot <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>dev.acloudtree.com
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/&gt;</span>
                Options FollowSymLinks
                AllowOverride None
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>dev.acloudtree.com<span style="color: #000000; font-weight: bold;">/&gt;</span>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
        ScriptAlias <span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/usr/lib/cgi-bin&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
                AllowOverride None
                Options +ExecCGI <span style="color: #660033;">-MultiViews</span> +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
        ErrorLog <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>error.log
&nbsp;
        <span style="color: #666666; font-style: italic;"># Possible values include: debug, info, notice, warn, error, crit,</span>
        <span style="color: #666666; font-style: italic;"># alert, emerg.</span>
        LogLevel warn
&nbsp;
        CustomLog <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>access.log combined
&nbsp;
    Alias <span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #ff0000;">&quot;/usr/share/doc/&quot;</span>
    <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/usr/share/doc/&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0<span style="color: #000000; font-weight: bold;">/</span>255.0.0.0 ::<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">128</span>
    <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;/</span>VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Just change the ErrorLog and CustomLog names to match the virtual host.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">...
        ErrorLog <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>dev.acloudtree.com_error.log
&nbsp;
        <span style="color: #666666; font-style: italic;"># Possible values include: debug, info, notice, warn, error, crit,</span>
        <span style="color: #666666; font-style: italic;"># alert, emerg.</span>
        LogLevel warn
&nbsp;
        CustomLog <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>dev.acloudtree.com_access.log combined
...
<span style="color: #000000; font-weight: bold;">&lt;/</span>VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.acloudtree.com/nerd-how-to-setup-virtual-hosts-on-ubuntu-9-10-using-apache2-mysql5-x-php5/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Beginning Cakephp &#8211; Errata : Pg 106</title>
		<link>http://www.acloudtree.com/beginning-cakephp-errata-pg-106/</link>
		<comments>http://www.acloudtree.com/beginning-cakephp-errata-pg-106/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 00:17:56 +0000</pubDate>
		<dc:creator>jared.folkins</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[106]]></category>
		<category><![CDATA[beginning cakephp]]></category>
		<category><![CDATA[errata]]></category>
		<category><![CDATA[findByYear]]></category>

		<guid isPermaLink="false">http://www.acloudtree.com/?p=44</guid>
		<description><![CDATA[The findByYear() function is messed up in the book. Thought I would post the correction to remind myself. Correct! function findByYear($year=null) { $date = $year.'-01-01 00:00:00'; $end_date = $year.'-12-31 23:59:59'; return $this-&#62;find('all', array( 'conditions' =&#62; array( 'DATE(Post.date) &#62;' =&#62; $date, 'DATE(Post.date) &#60;' =&#62; $end_date ) ) ); } Incorrect! function findByYear($year=null) { $date = $year.'-01-01 [...]]]></description>
			<content:encoded><![CDATA[<p>The findByYear() function is messed up in the book. Thought I would post the correction to remind myself.</p>
<p>Correct!<br />
<code></p>
<pre>
function findByYear($year=null) {
	$date = $year.'-01-01 00:00:00';
	$end_date = $year.'-12-31 23:59:59';
	return $this-&gt;find('all',
		array(
			'conditions' =&gt;
			array(
				'DATE(Post.date) &gt;' =&gt; $date,
				'DATE(Post.date) &lt;' =&gt; $end_date
			)
		 )
	);
}
</pre>
<p></code><br />
Incorrect!<br />
<code></p>
<pre>
function findByYear($year=null) {
	$date = $year.'-01-01 00:00:00';
	$end_date = $year.'-12-31 23:59:59';
	return $this-&gt;find('all',
		array(
			'conditions' =&gt;
			array(
				'DATE(Post.date)' =&gt; '&gt;'.$date,
				'DATE(Post.date)' =&gt; '&lt;'.$end_date
			)
		)
	);
}
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.acloudtree.com/beginning-cakephp-errata-pg-106/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ubuntu + VIM + CakePHP 1.2 + .ctp syntax highlighting</title>
		<link>http://www.acloudtree.com/ubuntu-vim-cakephp-12-ctp-syntax-highlighting/</link>
		<comments>http://www.acloudtree.com/ubuntu-vim-cakephp-12-ctp-syntax-highlighting/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 05:19:11 +0000</pubDate>
		<dc:creator>jared.folkins</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VIM]]></category>
		<category><![CDATA[.vimrc]]></category>
		<category><![CDATA[syntax highlighting]]></category>

		<guid isPermaLink="false">http://www.acloudtree.com/?p=43</guid>
		<description><![CDATA[Found this blog post concerning setting up the Cakephp view extension (.ctp) to use the same highlighting as (.php). blog I didn&#8217;t find his solution that helpful, but one of the comments said to add this to my &#8216;.vimrc&#8217; file in my home directory. if has(”autocmd”) autocmd BufEnter *.ctp set syn=php endif And since we [...]]]></description>
			<content:encoded><![CDATA[<p>Found this blog post concerning setting up the Cakephp view extension (.ctp) to use the same highlighting as (.php).</p>
<p><a href="http://quakey.wordpress.com/2007/07/11/vim-syntax-highlighting/">blog</a></p>
<p>I didn&#8217;t find his solution that helpful, but one of the comments said to add this to my &#8216;.vimrc&#8217; file in my home directory.</p>
<p><code><br />
if has(”autocmd”)<br />
autocmd BufEnter *.ctp set syn=php<br />
endif<br />
</code></p>
<p>And since we are on the topic here is how my .vimrc is setup</p>
<p><code></p>
<pre>
set tabstop=2
set shiftwidth=2
set expandtab

if has("autocmd")
autocmd BufEnter *.ctp set syn=php
endif

syn on</pre>
<p></code></p>
<p>-later</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acloudtree.com/ubuntu-vim-cakephp-12-ctp-syntax-highlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cakephp + Ubuntu 8.04 + Apache2 Mod_rewrite</title>
		<link>http://www.acloudtree.com/cakephp-ubuntu-804-apache2-mod_rewrite/</link>
		<comments>http://www.acloudtree.com/cakephp-ubuntu-804-apache2-mod_rewrite/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 21:56:51 +0000</pubDate>
		<dc:creator>jared.folkins</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.acloudtree.com/?p=41</guid>
		<description><![CDATA[This tutorial assumes that you installed the basic LAMP stack that ubuntu comes with. It is also assumed that this is a development installation of CakePHP 1) Download CakePHP. My directory after I uncompress it is called &#8216;cake_1.2.1.8004&#8242; *optional 2) Rename &#8216;cake_1.2.1.8004&#8242; to &#8216;cake&#8217; 3) Move the &#8216;cake&#8217; directory into &#8216;/var/www/&#8217; so your full path [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial assumes that you installed the basic LAMP stack that ubuntu comes with. It is also assumed that this is a development installation of CakePHP</p>
<p>1) Download CakePHP. My directory after I uncompress it is called &#8216;cake_1.2.1.8004&#8242;</p>
<p>*optional<br />
2) Rename &#8216;cake_1.2.1.8004&#8242; to &#8216;cake&#8217;</p>
<p>3) Move the &#8216;cake&#8217; directory into &#8216;/var/www/&#8217; so your full path becomes &#8216;/var/www/cake/&#8217;</p>
<p>4) Enable mod_rewrite<br />
<code><br />
username@ubuntu:/$ sudo a2enmod rewrite<br />
Enabling module rewrite.<br />
Run '/etc/init.d/apache2 restart' to activate new configuration!<br />
<code></code></code></p>
<p>5) Enable appropriate rules in &#8216;/etc/apache2/sites-available/default&#8217;<br />
<code><br />
username@ubuntu:/$ sudo vi /etc/apache2/sites-available/default<br />
</code></p>
<p>5a) Change the following<br />
<code><br />
Directory /<br />
Options FollowSymLinks<br />
AllowOverride None<br />
/Directory<br />
</code></p>
<p>To</p>
<p><code><br />
Directory /<br />
Options FollowSymLinks<br />
AllowOverride <strong>All</strong><br />
Directory</code></p>
<p>5b) Change the following<br />
<code><br />
Directory /var/www/<br />
Options Indexes FollowSymLinks MultiViews<br />
AllowOverride None<br />
Order allow,deny<br />
allow from all<br />
Directory</code></p>
<p>To</p>
<p><code><br />
Directory /var/www/<br />
Options Indexes FollowSymLinks MultiViews<br />
AllowOverride <strong>All</strong><br />
Order allow,deny<br />
allow from all<br />
/Directory</code></p>
<p>6) Restart apache2<br />
<code><br />
username@ubuntu:/$ sudo /etc/init.d/apache2 restart<br />
</code><br />
<a href="http://acloudtree.com/wp-content/uploads/2009/02/etc_apache2_sites-available_default" title="default screenshot">default screenshot</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.acloudtree.com/cakephp-ubuntu-804-apache2-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

