Prev | Current Page 269 | Next

Rob Allen, Nick Lo, and Steven Brown

"Zend Framework in Action"

To demonstrate this a little further let's take a look at Rob's
index.php file which never needs to move from his local machine:
$bootstrap = new Bootstrap('rob-dev');
$bootstrap->run();
Finally on the production server lies the untouched index.php with its own setting:
$bootstrap = new Bootstrap('production');
$bootstrap->run();
Having set all that up, the only file that moves between the environments is config.ini which, because it
contains the varying sections, can be the same file in use by all stages. Containing our application in this way
simplifies the moving of files between servers whether that be synchronising using your favourite FTP client
or a scripted deployment.
10.1.2 Using virtual hosts for development
Having outlined the use of separated hosting environments for the stages of development it's worth going
through an example of how the hosting itself can be setup to accommodate this. In this section I'll cover a brief
example assuming the use of the Apache web server in a Unix based machine on a small local network.
Virtual hosting is a method of serving multiple web sites from a single machine. The use of a single
machine reduces not only the cost of hardware but also the time required to support and maintain that machine.
The two main variations of virtual hosts are name-based virtual hosts that share the same IP address and IPbased
in which each virtual host has its own IP address.


Pages:
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
meble drewniane ABBA Fotografia slubna Paula Atherton Paula Abdul