Prev | Current Page 271 | Next

Rob Allen, Nick Lo, and Steven Brown

"Zend Framework in Action"

1610.1.100 places-dev
192.1610.1.100 places-stage
Configuring Apache
Having set-up the hosts file we now need to configure the virtual hosts in Apache's configuration file
httpd.conf as shown in the example in listing 10.4.
Listing 10.4 Our virtual host settings in Apache's httpd.conf file
NameVirtualHost *:100 A
B
Options Indexes MultiViews
AllowOverride All C
Order allow,deny
Allow from all

D
DocumentRoot /path/to/Sites/places-dev/web_root
ServerName places-dev

E
DocumentRoot /path/to/Sites/places-stage/web_root
ServerName places-stage

A Setting the IP address and port on which the server will receive requests
B Some default settings for all directories to which Apache has access
C The AllowOverride setting is important to allow the use of .htaccess settings needed by the Zend Framework
D Settings for our development host
E Settings for our staging host
In listing 10.4 we can see that the NameVirtualHost directive specifies that anything coming in on port
100 will receive requests for the name-based virtual hosts.
The directory section defines a few general settings for all virtual host directories, one to note in particular
is the AllowOverride setting which allows directories to override certain server settings using .


Pages:
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
sypialnia calvin klein euphoria pieniny noclegi q-power Paula Atherton