<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Virtual hosts on Mac OS X Leopard</title>
	<atom:link href="http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/feed/" rel="self" type="application/rss+xml" />
	<link>http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/</link>
	<description></description>
	<pubDate>Fri, 05 Sep 2008 18:53:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Edward</title>
		<link>http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/#comment-15490</link>
		<dc:creator>Edward</dc:creator>
		<pubDate>Fri, 04 Jul 2008 06:50:19 +0000</pubDate>
		<guid isPermaLink="false">http://foundationphp.com/blog/?p=46#comment-15490</guid>
		<description>I never could get it working after much research and headache. What I ended up doing was installing MAMP (and changing to the default apache and mysql ports in prefs per your suggestion on another site) and then using Headdress to set up the virtual hosts. The final missing link was to choose the folders for local root folder, images folder and testing server folder in manage sites the way you explained it in the book (select the exact root folder), but because Headdress uses port-based virtual hosts, the URL prefix field on the testing server pane of manage sites needs to say the address for the virtual site given by Headdress (i.e. http://localhost:9000/). After that, virrtual hosts finally worked again!</description>
		<content:encoded><![CDATA[<p>I never could get it working after much research and headache. What I ended up doing was installing MAMP (and changing to the default apache and mysql ports in prefs per your suggestion on another site) and then using Headdress to set up the virtual hosts. The final missing link was to choose the folders for local root folder, images folder and testing server folder in manage sites the way you explained it in the book (select the exact root folder), but because Headdress uses port-based virtual hosts, the URL prefix field on the testing server pane of manage sites needs to say the address for the virtual site given by Headdress (i.e. <a href="http://localhost:9000/" rel="nofollow">http://localhost:9000/</a>). After that, virrtual hosts finally worked again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edward</title>
		<link>http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/#comment-15476</link>
		<dc:creator>Edward</dc:creator>
		<pubDate>Mon, 16 Jun 2008 18:52:50 +0000</pubDate>
		<guid isPermaLink="false">http://foundationphp.com/blog/?p=46#comment-15476</guid>
		<description>Dear David,

Thanks for your reply! I checked the httpd-vhosts.conf file and the NameVirtualHost *:80 line is still there. Below is what my hosts file looks like. Anything I should change? And if not, any other thoughts on what might be wrong?

Many thanks,
Edward

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost 
fe80::1%lo0	localhost
127.0.0.1   trsvirtual
127.0.0.1   tekvirtual
127.0.0.1   rjvirtual
127.0.0.1   remvirtual
127.0.0.1   dwcsvirtual
127.0.0.1   testvirtual
127.0.0.1   lrcvirtual
127.0.0.1   cmvirtual</description>
		<content:encoded><![CDATA[<p>Dear David,</p>
<p>Thanks for your reply! I checked the httpd-vhosts.conf file and the NameVirtualHost *:80 line is still there. Below is what my hosts file looks like. Anything I should change? And if not, any other thoughts on what might be wrong?</p>
<p>Many thanks,<br />
Edward</p>
<p>##<br />
# Host Database<br />
#<br />
# localhost is used to configure the loopback interface<br />
# when the system is booting.  Do not change this entry.<br />
##<br />
127.0.0.1	localhost<br />
255.255.255.255	broadcasthost<br />
::1             localhost<br />
fe80::1%lo0	localhost<br />
127.0.0.1   trsvirtual<br />
127.0.0.1   tekvirtual<br />
127.0.0.1   rjvirtual<br />
127.0.0.1   remvirtual<br />
127.0.0.1   dwcsvirtual<br />
127.0.0.1   testvirtual<br />
127.0.0.1   lrcvirtual<br />
127.0.0.1   cmvirtual</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Powers</title>
		<link>http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/#comment-15473</link>
		<dc:creator>David Powers</dc:creator>
		<pubDate>Sun, 15 Jun 2008 12:16:34 +0000</pubDate>
		<guid isPermaLink="false">http://foundationphp.com/blog/?p=46#comment-15473</guid>
		<description>If it can't find "localhost", you have probably made a mess of the &lt;code&gt;hosts&lt;/code&gt; file. Also make sure that you haven't accidentally deleted &lt;code&gt;NameVirtualHost *:80&lt;/code&gt; in &lt;code&gt;httpd-vhosts.conf&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>If it can&#8217;t find &#8220;localhost&#8221;, you have probably made a mess of the <code>hosts</code> file. Also make sure that you haven&#8217;t accidentally deleted <code>NameVirtualHost *:80</code> in <code>httpd-vhosts.conf</code>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edward</title>
		<link>http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/#comment-15472</link>
		<dc:creator>Edward</dc:creator>
		<pubDate>Sun, 15 Jun 2008 10:27:10 +0000</pubDate>
		<guid isPermaLink="false">http://foundationphp.com/blog/?p=46#comment-15472</guid>
		<description>Dear David,

Thanks for your quick response to my posting. I went through all the steps on both articles you posted again just to make sure. I still can't access the virtual hosts. However, when I tried to access the test.php page on the web this time, I got this message - "Safari can’t open the page “http://localhost/test.php” because it can’t find the server “localhost”." Just wondering if this gives any clues as to what might be wrong. 

If not, is there any way to get back to the defaults that are installed with Leopard in case I've messed something up with PHP? (By the way, my Apache page that is linked to from the web sharing system preference still loads fine.) 

Thanks!

Edward</description>
		<content:encoded><![CDATA[<p>Dear David,</p>
<p>Thanks for your quick response to my posting. I went through all the steps on both articles you posted again just to make sure. I still can&#8217;t access the virtual hosts. However, when I tried to access the test.php page on the web this time, I got this message - &#8220;Safari can’t open the page “http://localhost/test.php” because it can’t find the server “localhost”.&#8221; Just wondering if this gives any clues as to what might be wrong. </p>
<p>If not, is there any way to get back to the defaults that are installed with Leopard in case I&#8217;ve messed something up with PHP? (By the way, my Apache page that is linked to from the web sharing system preference still loads fine.) </p>
<p>Thanks!</p>
<p>Edward</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Powers</title>
		<link>http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/#comment-15471</link>
		<dc:creator>David Powers</dc:creator>
		<pubDate>Sun, 15 Jun 2008 09:12:29 +0000</pubDate>
		<guid isPermaLink="false">http://foundationphp.com/blog/?p=46#comment-15471</guid>
		<description>Edward, the note after step 15 refers to an ordinary upgrade. Since you did erase and install, you won't have the httpd folder. You can ignore that. The username.conf file looks fine - mine is exactly the same.

Not sure why you're not getting the virtual host recognized. If you followed the instructions, it should work.</description>
		<content:encoded><![CDATA[<p>Edward, the note after step 15 refers to an ordinary upgrade. Since you did erase and install, you won&#8217;t have the httpd folder. You can ignore that. The username.conf file looks fine - mine is exactly the same.</p>
<p>Not sure why you&#8217;re not getting the virtual host recognized. If you followed the instructions, it should work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edward</title>
		<link>http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/#comment-15470</link>
		<dc:creator>Edward</dc:creator>
		<pubDate>Sun, 15 Jun 2008 08:56:54 +0000</pubDate>
		<guid isPermaLink="false">http://foundationphp.com/blog/?p=46#comment-15470</guid>
		<description>Oops - it looks like the web form edited my code for what the username.conf file looks like that was the same on both systems. I'll try to write it again below without using carats:

LEFTCARATDirectory "/Users/admin/Sites/"RIGHTCARAT
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
LEFTCARAT/DirectoryRIGHTCARAT</description>
		<content:encoded><![CDATA[<p>Oops - it looks like the web form edited my code for what the username.conf file looks like that was the same on both systems. I&#8217;ll try to write it again below without using carats:</p>
<p>LEFTCARATDirectory &#8220;/Users/admin/Sites/&#8221;RIGHTCARAT<br />
    Options Indexes MultiViews<br />
    AllowOverride None<br />
    Order allow,deny<br />
    Allow from all<br />
LEFTCARAT/DirectoryRIGHTCARAT</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edward</title>
		<link>http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/#comment-15469</link>
		<dc:creator>Edward</dc:creator>
		<pubDate>Sun, 15 Jun 2008 08:53:06 +0000</pubDate>
		<guid isPermaLink="false">http://foundationphp.com/blog/?p=46#comment-15469</guid>
		<description>Hi David,

I have been enjoying your EGDWCS3 book for several months now - thank you for writing it! Before upgrading to Leopard, I had virtual hosts set up and running smoothly by following the instructions in the book. I just upgraded to Leopard a few days ago (using erase and install and then the Leopard installer migrated everything it could from the clone backup of my old Tiger system). Then I followed your new instructions online for "Enabling PHP and Apache in Leopard" and "Creating a virtual host in Mac OS X 10.5 (Leopard)". I followed all of your instructions to the letter as far as I can tell. 

However, the first problem I've run into is that when I try to do the "note" after step 15 in the "Enabling PHP and Apache.." article, where you enter the two lines in terminal -
cd /private/etc/httpd/users
ls
- I get the response back from terminal that no such directory exists. In fact, when I looked at my tree structure in TextWrangler, there is not even an httpd folder inside the etc folder. 

After trying to figure this out for a while, I went back to my clone of my Tiger drive and opened the username.conf file in the private/etc/httpd/users location and compared it to the username.conf file in the private/etc/Apache2/users location on my Leopard system and the files were already exactly the same. Here's what they look like when opened:


    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all


So I'm not sure what to do about that problem. 

My second problem is that when I try to access any of my virtual hosts, Safari can't load the web page and I get this response - "Safari can’t open the page “http://egdwcs3/” because it can’t find the server “egdwcs3”. I get this same type of error with all of my virtual hosts.

Any assistance would be greatly appreciated. Thanks!

Edward</description>
		<content:encoded><![CDATA[<p>Hi David,</p>
<p>I have been enjoying your EGDWCS3 book for several months now - thank you for writing it! Before upgrading to Leopard, I had virtual hosts set up and running smoothly by following the instructions in the book. I just upgraded to Leopard a few days ago (using erase and install and then the Leopard installer migrated everything it could from the clone backup of my old Tiger system). Then I followed your new instructions online for &#8220;Enabling PHP and Apache in Leopard&#8221; and &#8220;Creating a virtual host in Mac OS X 10.5 (Leopard)&#8221;. I followed all of your instructions to the letter as far as I can tell. </p>
<p>However, the first problem I&#8217;ve run into is that when I try to do the &#8220;note&#8221; after step 15 in the &#8220;Enabling PHP and Apache..&#8221; article, where you enter the two lines in terminal -<br />
cd /private/etc/httpd/users<br />
ls<br />
- I get the response back from terminal that no such directory exists. In fact, when I looked at my tree structure in TextWrangler, there is not even an httpd folder inside the etc folder. </p>
<p>After trying to figure this out for a while, I went back to my clone of my Tiger drive and opened the username.conf file in the private/etc/httpd/users location and compared it to the username.conf file in the private/etc/Apache2/users location on my Leopard system and the files were already exactly the same. Here&#8217;s what they look like when opened:</p>
<p>    Options Indexes MultiViews<br />
    AllowOverride None<br />
    Order allow,deny<br />
    Allow from all</p>
<p>So I&#8217;m not sure what to do about that problem. </p>
<p>My second problem is that when I try to access any of my virtual hosts, Safari can&#8217;t load the web page and I get this response - &#8220;Safari can’t open the page “http://egdwcs3/” because it can’t find the server “egdwcs3”. I get this same type of error with all of my virtual hosts.</p>
<p>Any assistance would be greatly appreciated. Thanks!</p>
<p>Edward</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Powers</title>
		<link>http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/#comment-15445</link>
		<dc:creator>David Powers</dc:creator>
		<pubDate>Thu, 22 May 2008 10:46:53 +0000</pubDate>
		<guid isPermaLink="false">http://foundationphp.com/blog/?p=46#comment-15445</guid>
		<description>Peter, my instructions &lt;strong&gt;will&lt;/strong&gt; work for multiple sites.</description>
		<content:encoded><![CDATA[<p>Peter, my instructions <strong>will</strong> work for multiple sites.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/#comment-15428</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Sun, 11 May 2008 08:12:57 +0000</pubDate>
		<guid isPermaLink="false">http://foundationphp.com/blog/?p=46#comment-15428</guid>
		<description>This won't work for multiple sites will it, by that I mean if I have 100 sites, eg http://clientsiteone/ http://clientsitetwo/ that wouldn't work with this method because whichever comes first such as 127.0.0.1  clientsiteone will hijack the path of any 

   DocumentRoot "/Library/WebServer/Documents"
   ServerName clientsiteone


after right?

Would you agree that using aliases is the best option here, like:

Alias /clientsiteone "/Users/me/Sites/clients/clientone/clientsiteone/www"

then the url is http://localhost/clientsiteone/

Is there a better way?</description>
		<content:encoded><![CDATA[<p>This won&#8217;t work for multiple sites will it, by that I mean if I have 100 sites, eg <a href="http://clientsiteone/" rel="nofollow">http://clientsiteone/</a> <a href="http://clientsitetwo/" rel="nofollow">http://clientsitetwo/</a> that wouldn&#8217;t work with this method because whichever comes first such as 127.0.0.1  clientsiteone will hijack the path of any </p>
<p>   DocumentRoot &#8220;/Library/WebServer/Documents&#8221;<br />
   ServerName clientsiteone</p>
<p>after right?</p>
<p>Would you agree that using aliases is the best option here, like:</p>
<p>Alias /clientsiteone &#8220;/Users/me/Sites/clients/clientone/clientsiteone/www&#8221;</p>
<p>then the url is <a href="http://localhost/clientsiteone/" rel="nofollow">http://localhost/clientsiteone/</a></p>
<p>Is there a better way?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Powers</title>
		<link>http://foundationphp.com/blog/2008/05/03/virtual-hosts-on-mac-os-x-leopard/#comment-15424</link>
		<dc:creator>David Powers</dc:creator>
		<pubDate>Tue, 06 May 2008 13:59:40 +0000</pubDate>
		<guid isPermaLink="false">http://foundationphp.com/blog/?p=46#comment-15424</guid>
		<description>There should be a space between cd and /private. cd is a command that means "change directory".</description>
		<content:encoded><![CDATA[<p>There should be a space between cd and /private. cd is a command that means &#8220;change directory&#8221;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
