Posts filed under 'Apache'

Virtual hosts on Mac OS X Leopard

The instructions in The Essential Guide to Dreamweaver CS3 and Foundation PHP for Dreamweaver 8 were written before the release of Mac OS X 10.5 (Leopard). Revised instructions for setting up virtual hosts on Leopard can now be found in the Tutorials section of my website.

11 comments May 3rd, 2008

Finding the Apache Windows installer

Several readers of my books have reported being unable to find the Windows installer for Apache on the Apache download page. Apache is available in many different versions, so the direct links don’t always list the MSI installer package for Windows. If the Windows installer isn’t listed, click the link for Other files, followed by the links for binaries and win32. On the final page, scroll down until you find apache_2.2.x-win32-x86-no_ssl.msi
(where x represents the number of the most recent version).

I can’t give a direct link to the file because Apache requests that you always use a mirror site close to you. Following the links as described here automatically takes you to a mirror site.

9 comments December 14th, 2007

Tutorial on setting up virtual hosts in Apache 2.2

Changes to the way Apache handles virtual hosts in the 2.2 series affect the instructions for setting up virtual hosts in Windows on pages 86-7 of Foundation PHP for Dreamweaver 8. The most important difference is that Apache 2.2 applies stricter permissions than either the 1.3 or the 2.0 series, so you’re likely to see a “Forbidden” message rather than the website that you were expecting. The other change is that the main configuration file, httpd.conf no longer contains everything under the sun. Virtual hosts and other optional features are now controlled by external files.

I’ve created a tutorial showing how to set up virtual hosts on Apache 2.2 in Windows. Although it was originally intended as an update for my book, I decided to give full instructions, rather than just outline the differences. As a result, the tutorial can be used even if you don’t have a copy of Foundation PHP for Dreamweaver 8. Although why anybody should be without a copy is one of the great mysteries of the universe. ;)

If you haven’t experimented with virtual hosts in your local development environment, they’re well worth looking into - and they’re not difficult to set up. If you locate your testing sites in the Apache server root, localhost becomes the site root, and what should be the top level of the site goes in a subfolder. For simple sites, this doesn’t really matter, but it can make testing very difficult if you want to use links in PHP includes.

Root-relative links cannot be tested if the site is in a subfolder of the server root, but using a virtual host solves the problem. A virtual host gives you exactly the same structure in your testing environment as a live site because the top level folder of the virtual host becomes the testing site root. If you make extensive use of includes, virtual hosts are the way to go.

13 comments December 10th, 2006


Calendar

July 2008
M T W T F S S
« Jun    
 123456
78910111213
14151617181920
21222324252627
28293031  

Posts by Month

Posts by Category