Apache
  Home arrow Apache arrow Page 2 - Getting Started with Apache 2.0 Part I...
Dev Shed Forums 
Administration  
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 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Rational Software Development Conference
 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? 
APACHE

Getting Started with Apache 2.0 Part III
By: Harish Kamath
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 12
    2005-03-28

    Table of Contents:
  • Getting Started with Apache 2.0 Part III
  • Personalized Websites
  • URL Rewriting
  • Et Cetera

  • 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

    Dell PowerEdge Servers

    Getting Started with Apache 2.0 Part III - Personalized Websites
    (Page 2 of 4 )

    I've already shown you how to host several websites on a single instance of Apache using "Virtual Hosts." However, this mechanism can be tedious to maintain if a network administrator wishes to allow each user (on the network) to host his/her own website on the Web server. Fortunately, Apache is equipped with the "mod_userdir" module, which allows visitors to access user-specific web sites using a pre-defined syntax.

    Consider the following scenario: you have a Web server that can be accessed by pointing a Web browser to "http://www.myfirm.com/". Now, you would like to provide each user in the office - say Tom, Dick and Harry - with their own custom web sites, accessible using the following URLs - "http://www.myfirm.com/~tom", "http://www.myfirm.com/~dick" and "http://www.myfirm.com/~harry" respectively.

    No sweat - all you need to do is configure the "mod_userdir" module (compiled, by default) with the help of the "UserDir" directive. Take a look:

    UserDir /home/*/www

    The above directive will translate every request to a user-specific directory to the appropriate location. For example, a request for the file "http://www.myfirm.com/~harry/photos/index.html" will result in an attempt to retrieve the file located at "/home/harry/www/photos/index.html", where "/home/harry/" is the default user folder for Harry.

    If you're paranoid about security, you have the option of enabling this feature for specific users only. For example,what if you would like to only allow Dick and Harry to host their websites on the server while preventing access to all other user-specific websites (including that of Tom)? Just implement the following changes:

    UserDir disabled
    UserDir enabled dick harry
    UserDir /home/*/www

    For starters, the "disabled" keyword disables access to the "per-user" directory of all users. Subsequently, the "enabled" keyword allows you to list the users for whom you would like to enable this feature.

    Note that there are several security concerns that you need to address if you enable this feature. Therefore, it would be wise to review the following tutorial (part of the official Apache documentation) before you proceed any further:  http://httpd.apache.org/docs-2.0/howto/public_html.html.

    More Apache Articles
    More By Harish Kamath


     

       

    APACHE ARTICLES

    - Putting Apache in Jail
    - Containing Intrusions in Apache
    - Server Limits for Apache Security
    - Setting Permissions in Apache
    - Installing Apache
    - Apache Installation and Configuration
    - Apache Tapestry and Custom Components: DateI...
    - Tapestry and AJAX: Autocompleter and InlineE...
    - PropertySelection and IPropertySelectionMode...
    - The DatePicker and Shell Components of Apach...
    - Apache Tapestry: ASO and More Components
    - Apache Tapestry and DirectLink, IoC and DI
    - Making a CelebrityCollector with Apache Tape...
    - Apache Tapestry and Listener Methods, Condit...
    - The Properties of Tapestry Pages

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




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