Home > Controlling Web access with Apache
Book Chapter:
EMAIL THIS LICENSING & REPRINTS

Controlling Web access with Apache

05 Oct 2005 | O'Reilly

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

Web Security Privacy and Commerce, Second Edition

By Simson Garfinkel and Eugene Spafford
800 pages; $44.95
O'Reilly

In this excerpt from Chapter 20 of Web Security Privacy and Commerce, Second Edition, authors Simson Garfinkel and Eugene Spafford introduce a common way to implement access control with an Apache Web server.

One of the most common ways to restrict access to Web-based information is to protect it using usernames and passwords. Although different servers support many different ways of password-protecting web information, one of the most common techniques is with the <Limit> server configuration directive present in the Apache Web server.

Using <Limit>, you can control which files on your Web server can be accessed and by whom. The Apache server gives you two locations where you can place your access control information:

  • You can place the restrictions for any given directory (and all of its subdirectories) in a special file located in that directory. Traditionally the name of this file is .htaccess, although you can change the name in the server's configuration file.

  • Alternatively, you can place all of the access control restrictions in a single configuration file. The Apache server allows you to place access control information in the server's single httpd.conf file.

Whether you choose to use many access files or a single file is up to you. It is certainly
More information

Download Chapter 20, Controlling access to your Web content

Learn more about Web security in Web Security School

Visit our resource center for more tips and advice on Web access control

more convenient to have a file in each directory. It also makes it easier to move directories within your Web server, as you do not need to update the master access control file. Furthermore, you do not need to restart your server whenever you make a change to the access control list — the server will notice that there is a new .htaccess file and behave appropriately.

On the other hand, having an access file in each directory means there are more files that you need to check to see whether the directories are protected. There is also the possibility that an attacker will be able to convince your Web server (or another server running on the same computer) to fetch this file directly. Although the attacker's possession of the .htaccess file doesn't ruin your system's security, it gives an attacker additional information that might be used to find other holes.

Read the rest of Chapter 20 and learn how to enforce access control with the .htaccess file and configuration file.

From Web Security, Privacy & Commerce, 2nd Edition
by Simson Garfinkel with Gene Spafford
ISBN: 0-596-00045-6
Copyright 2002 O'Reilly Media, 800-998-9938
Reprinted with permission



Sound Off! -   Be the first to post a message to Sound Off!


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Web Application Security (Also see Web Access Control)
Tracing malware's steps with RE:Trace
SQL injection attack infects hundreds of thousands of websites
PCI Council issues clarification on Web application security
IBM's Watchfire halts network research, focuses on Web apps
Web scanning and reporting best practices
How to prevent software piracy
NAC, disk encryption gaining attention, survey shows
Shrewd attackers bypass old security defenses with Web attacks
PCI DSS Section 6: A plan for tackling application security
What Web security initiatives can be taken on a college campus?

Web Access Control
Microsoft WIL: How to take control of data integrity levels
Video: Changes ahead for MIT Kerberos Consortium
Kerberos security evolves for B2B, mobile tech
Kerberos: Authentication with some drawbacks
Sun shifts strategy with GRC push
CardSpace vs. user IDs and passwords
What are the risks of connecting a Web service to an external system via SSL?
Enterprise security in 2008: Assessing access management
How does identity propagation work?
Which tools can keep personally identifiable information (PII) out of access logs?

IIS Security
Trend Micro site compromised
What server considerations should be made when setting up an internal network's private applications?
IT discussion: Is malware the cause of a DNS server error?
Insider's guide to IIS Web server security
Microsoft July updates for critical Excel, Windows and .NET flaws
Finding and blocking Web application server attack vectors
What's the best way to verify client authentication across unrelated Web servers?
Microsoft to release DNS patch Tuesday
DNS worm strikes at Microsoft flaw
How to implement IIS authentication settings
IIS Security Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
anonymous Web surfing  (SearchSecurity.com)
buffer overflow  (SearchSecurity.com)
cache cramming  (SearchSecurity.com)
cookie poisoning  (SearchSecurity.com)
dictionary attack  (SearchSecurity.com)
distributed denial-of-service attack  (SearchSecurity.com)
JavaScript hijacking  (SearchSecurity.com)
National Computer Security Center  (SearchSecurity.com)
threat modeling  (SearchSecurity.com)
trigraph  (SearchSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


TechTarget Security Media
Information Security View this month\\'s issue and subscribe today.
Information Security Decisions Apply online for free conference admission.
SearchSecurity.com
HomeNewsMagazineWebcastsWhite PapersLearningAdviceTopicsEventsAbout Us

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2003 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts