oreilly.comSafari Books Online.Conferences.
BooksAll ArticlesSafari BookshelfO'Reilly GearFree Newsletters

Apache FAQ
Linux FAQ

Log in to particpate


   Apache FAQ > F. Dynamic Content (CGI and SSI)
Question:  How do I allow each of my user directories to have a cgi-bin directory?

Remember that CGI execution does not need to be restricted only to cgi-bin directories. You can allow CGI script execution in arbitrary parts of your filesystem.

There are many ways to give each user directory a cgi-bin directory such that anything requested as will be executed as a CGI script. Two alternatives are:

  1. Place the cgi-bin directory next to the public_html directory:
    ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2
  2. Place the cgi-bin directory underneath the public_html directory:
    <Directory /home/*/public_html/cgi-bin>
        Options ExecCGI
        SetHandler cgi-script

This FAQ is from Apache Server Frequently Asked Questions

Sponsored by:

Contact UsMedia KitPrivacy PolicyPress NewsJobs @ O'Reilly
Copyright © 2000-2006 O’Reilly Media, Inc. All Rights Reserved.
All trademarks and registered trademarks appearing on the O'Reilly Network are the property of their respective owners.
For problems or assistance with this site, email