Web Hosting How-Tos
  Home arrow Web Hosting How-Tos arrow Page 4 - Configuring Apache – Intermediate
Web Hosting Articles  
Web Hosting FAQs  
Web Hosting How-Tos  
Web Hosting News  
Web Hosting Security  
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
ASP Web Hosting  
ASP.NET Web Hosting 
Budget Hosting 
Coldfusion 
Colocation 
Mobile Linux 
APP Generation ROI 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Reseller Web Hosting 
Shared Hosting 
Small Business Hosting 
Virtual Private Servers 
Windows Web Hosting
 
 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? 
WEB HOSTING HOW-TOS

Configuring Apache – Intermediate
By: Michael Swanson
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 14
    2005-01-12

    Table of Contents:
  • Configuring Apache – Intermediate
  • Modules
  • Authentication
  • Authorization

  • 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


    Configuring Apache – Intermediate - Authorization


    (Page 4 of 4 )

    Another way to block access to certain parts of the server is through the process of authorization. This uses other variables besides username and password to allow or deny access to certain Web resources. There are three directives involved in this, and they can be used in any <Location> <File> <Directory> or <VirtualHost> block.

    First, we will look at the “Allow” and “Deny” directives. These both take the same sort of arguments which can loosely be defined as some sort of network name or IP address. These let you define whether a directory will be allowed or denied based on what network source a request is originating from. Also, you can use the “All” argument to mean every possible network address. For example, the directive “Allow from 10.0.1” would allow access to a certain resource to any client originating at some address within the “10.0.1” subnet. The third directive is the “Order” directive, which determines, not surprisingly, in what order the “Allow” and “Deny” directives will be evaluated.

    Basically, this determines whether clients will be allowed by default or denied by default. Using the directive “Order deny,allow” would default to “Allow” for any clients not specifically denied and “Order allow,deny” would default to “Deny” for those not defined.  An example of using this strategy to protect access to a specific directory follows:

     <Directory /www/private>
      Order deny,allow
      Deny from all
      Allow from 10.0.1
     </Directory>

    This would deny any requests except those coming from some IP address within the “10.0.1” subnet. 

    Conclusion

    This article has shown some of the intermediate level configuration tasks on an Apache server.  It has dealt with using virtual hosts to serve multiple domains on a single Web server, adding a simple module to Apache to increase its functionality and using authentication and authorization to control access to certain Web resources. These tasks can significantly increase the usefulness and capabilities of your Apache server, as well as give the administrator more power and control over what information gets accessed by different computers. 


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    WEB HOSTING HOW-TOS ARTICLES

    - Choosing a Web Host for Your WordPress Blog
    - Connecting to a Server using SSH: the Fundam...
    - How to Expand a Simple Website
    - Practical Virtualization with VirtualBox
    - Other Uses for Your Web Hosting Server
    - Hosting Your Own Website: Reliability
    - Introduction to Hosting Websites
    - Choosing a Website Host
    - How to Choose a Budget Web Host
    - URL Redirection
    - How to Link a Domain Name to a Dynamic IP
    - How to Set up a Simple Website
    - Choosing the Right Kind of Web Hosting
    - Introduction to Choosing the Right Web Host
    - Strategies for Creating Domain Names






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