Administration
  Home arrow Administration arrow Page 3 - Getting More Out Of Apache (Part 1)
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Getting More Out Of Apache (Part 1)
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2001-01-04

    Table of Contents:
  • Getting More Out Of Apache (Part 1)
  • Virtually Yours
  • Two Birds With One Host
  • Gotcha!
  • Including A Few More Tricks

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Getting More Out Of Apache (Part 1) - Two Birds With One Host


    (Page 3 of 5 )

    Here's what the final product looks like:

    # host setting for melonfire-alpha.com <VirtualHost 127.0.0.1> ServerAdmin webmaster@melonfire-alpha.com DocumentRoot /www/melonfire-alpha.com ServerName melonfire-alpha.com ErrorLog logs/melonfire-alpha.com-error_log CustomLog logs/melonfire-alpha.com-access_log common </VirtualHost> # host setting for melonfire-beta.com <VirtualHost 127.0.0.1> ServerAdmin webmaster@melonfire-beta.com DocumentRoot /www/melonfire-beta.com ServerName melonfire-beta.com ErrorLog logs/melonfire-beta.com-error_log CustomLog logs/melonfire-beta.com-access_log common </VirtualHost>
    And you can test it by restarting the Apache server and pointing your browser to the Web sites http://melonfire-alpha.com and http://melonfire-beta.com (note that you may need to update your DNS tables as well for this to work).

    On the assumption that you have created HTML files for each host and stored them in the locations you've specified for the DocumentRoot directive, Apache should display the appropriate index page for each server. And if you take a look at the log files, you should see separate log files for each virtual host.

    As you might imagine, the ability to host multiple Web sites on a single server is an elegant - and economical - solution to the problem of limited IP address range in the IPv4 protocol. It also allows Web hosting services to "sub-host" multiple client domains on a single server, and developers to run multiple Web sites on their development and test systems for simulation purposes.

    More Administration Articles
    More By icarus, (c) Melonfire


     

       

    ADMINISTRATION ARTICLES

    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway