Practical mod_perl / HTML Book /



previous page: 12.10. Frontend/Backend Proxying with Virtual Hosts
  
page up: HTML Version of the book
  
next page: 12.10.2. Dual-Server Virtual Host Configuration

12.10.1. Virtual Host Flavors


Apache supports three flavors of virtual hosts:

IP-based virtual hosts
In this form, each virtual host uses its own IP address. Under Unix, multiple IP addresses are assigned to the same network interface using the ifconfig utility. These additional IP addresses are sometimes called virtual addresses or IP aliases. IP-based virtual hosting is the oldest form of virtual hosting. Due to the supposed increasing scarcity of IP addresses and ensuing difficulty in obtaining large network blocks in some parts of the world, IP-based virtual hosting is now less preferred than name-based virtual hosting.

Name-based virtual hosts
Name-based virtual hosts share a single IP address. Apache dispatches requests to the appropriate virtual host by examining the Host: HTTP header field. This field's value is the hostname extracted from the requested URI. Although this header is mandatory for HTTP 1.1 clients, it has also been widely used by HTTP 1.0 clients for many years.

Port-based virtual hosts
In this setup, all virtual hosts share the same IP address, but each uses its own unique port number. As we'll discuss in the next section, port-based virtual hosts are mostly useful for backend servers not directly accessible from Internet clients.

Mixed flavors
It is perfectly possible to mix the various virtual host flavors in one server.

 

Continue to:

  • prev: 12.10. Frontend/Backend Proxying with Virtual Hosts
  • Table of Contents
  • next: 12.10.2. Dual-Server Virtual Host Configuration







TOP
previous page: 12.10. Frontend/Backend Proxying with Virtual Hosts
  
page up: HTML Version of the book
  
next page: 12.10.2. Dual-Server Virtual Host Configuration


Menu

  • HTML Book
  • PDF Book
  • Download Code
  • Table of Contents
  • Errata
  • mod_perl2 User's Guide
  • Sitemap

Search


Add to Google




Creative Commons License


Written by
Eric Cholet (Logilune) and
Stas Bekman (StasoSphere & Free Books).


[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007 StasoSphere.com