| Virtually Yours |
It's a common misconception that a single Web server can host, or "serve", only a single Web site, since a server typically has only a single IP address assigned to it. This is not at all true - and over the next couple of pages, I'll be showing you how you can use Apache to serve up more than one Web site at a time.
First, though, the basics - every computer on the Internet is assigned an IP address, which serves as a unique identifier for that computer. In order to connect to a Web site, a user needs to know the IP address of the computer on which that Web site is stored. However, since users cannot be expected to remember strings of numbers for different Web sites, the Domain Name System was introduced to make things a little easier.
The Domain Name System, or DNS, maps each numeric string to an easy-to-remember word or phrase. For example, the IP address 184.108.40.206 and the word "yahoo.com" both refer to the same Web site; however, the latter is much easier to remember. By mapping names to IP addresses, the DNS makes it easier to navigate the Web.
What does this have to do with Apache? Well, Apache was the first Web server to introduce "name-based virtual hosting". The concept is simple and elegant: different domain names all point to the same IP address, and the Web server at that IP address has the intelligence necessary to display a different Web page for each domain.
Name-based virtual hosting has been available since the HTTP/1.1 protocol came out. However, there is one gotcha - in order for this to work, the client browser must also include support for HTTP/1.1. Most newer browsers do include this support - and for those which don't, there's a workaround which allows them to perceive similar functionality.
How to do Everything with PHP & MySQL
How to do Everything with PHP & MySQL, the best-selling book by Melonfire, explains how to take full advantage of PHP's built-in support for MySQL and link the results of database queries to Web pages. You'll get full details on PHP programming and MySQL database development, and then you'll learn to use these two cutting-edge technologies together. Easy-to-follow sample applications include a PHP online shopping cart, a MySQL order tracking system, and a PHP/MySQL news publishing system.
Read more, or grab your copy now!