Apache
  Home arrow Apache arrow Page 2 - Getting Started with Apache 2.0 Part III
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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? 
Google.com  
APACHE

Getting Started with Apache 2.0 Part III
By: Harish Kamath
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 13
    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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    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

    - Creating a VAMP (Vista, Apache, MySQL, PHP) ...
    - 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...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek