Apache
  Home arrow Apache arrow Page 2 - Putting Apache in Jail
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? 
APACHE

Putting Apache in Jail
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 2
    2008-01-31


    Table of Contents:
  • Putting Apache in Jail
  • Finishing touches for Apache jail preparation
  • Preparing PHP to work in jail
  • Taking care of small jail problems
  • Using mod_security or mod_chroot

  • 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


    Putting Apache in Jail - Finishing touches for Apache jail preparation
    ( Page 2 of 5 )

    The walls of the jail are now up. Though the following files are not necessary, experience shows that many scripts require them. Add them now to avoid having to debug mysterious problems later.

    Construct special devices after using ls to examine the existing /dev folder to learn what numbers should be used:

      # mkdir /chroot/apache/dev
      # mknod -m 666 /chroot/apache/dev/null c 1 3
      # mknod -m 666 /chroot/apache/dev/zero c 1 5
      # mknod -m 644 /chroot/apache/dev/random c 1 8

    Then, add a temporary folder:

      # mkdir /chroot/apache/tmp
      # chmod +t /chroot/apache/tmp
      # chmod 777 /chroot/apache/tmp

    Finally, configure the time zone and the locale (we could have copied the whole /usr/ share/locale folder but we will not because of its size):

      # cp /usr/share/zoneinfo/MET /chroot/apache/
    etc/localtime
     
    # mkdir
    -p /chroot/apache/usr/lib/locale
     
    # set | grep LANG
     
    LANG=en_US.UTF- 8
      LANGVAR=en_US.UTF-8
      #
    cp -dpR /usr/lib/locale/en_US.utf8 /chroot/ apache/usr/lib/locale  



     
     
    >>> More Apache Articles          >>> More By O'Reilly Media
     

       

    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 5 Hosted by Hostway
    Stay green...Green IT