ONLamp.com
oreilly.comSafari Books Online.Conferences.

FAQS
 FAQs
Apache FAQ
Linux FAQ
XML 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?
Answer:

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 http://example.com/~user/cgi-bin/program 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
    </Directory>

This FAQ is from Apache Server Frequently Asked Questions

Sponsored by: