Administration
  Home arrow Administration arrow Page 4 - Getting More Out Of Apache (Part 2)
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 Developerworks
 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 2)
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2001-01-23

    Table of Contents:
  • Getting More Out Of Apache (Part 2)
  • Eyes Only
  • Identity Check
  • Grouping Things Together
  • Timmmmmmbbbbberrrr!
  • When Things Go Wrong
  • Just Rewrite It!
  • Putting It Into Practice

  • 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 More Out Of Apache (Part 2) - Grouping Things Together
    (Page 4 of 8 )

    In addition to user-level access, Apache also allows you to createdifferent groups of individual users, and restrict access to protectedresources based on group membership. For example, let's assume that I havetwo groups, "accounts" and "admin", and I would like to restrict access toa directory only to members of the "accounts" group.

    The first thing to do is change the ".htaccess" file in the directory toread

    AuthType Basic AuthName "Top-Secret Information" AuthUserFile /usr/local/apache/auth/mfre/users AuthGroupFile /usr/local/apache/auth/mfre/groups require group accounts
    Next, you need to create the group memberships file, as specified in theAuthGroupFile directive above. This file is extremely simple - here's whatit looks like:

    $ cat groups admin: bill harry accounts: joe beth
    Translation: users "joe" and "beth" are members of the group "accounts",while "bill" and "harry" are members of the group "admin".

    Now, when you navigate back to the protected directory in your Web browser,Apache will again ask you for authorization; however, only members of thegroup "accounts" will be permitted to view the contents of the directory.

    Finally, you can allow or deny access based on host names - the followinglines would deny access to the protected resource for all requests fromdomains other than "melonfire.com"

    order deny,allow deny from all allow from melonfire.com

    More Administration Articles
    More By icarus, (c) Melonfire


     

       

    ADMINISTRATION ARTICLES

    - 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
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD

     
    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 1 hosted by Hostway