APACHE: setting up cgi-bins for home Dirs in access.conf

my apache can read http://servername.dot/~username/
as the public_html in a user's directory, but it can't execute cgi scripts I had placed in the users /public_html/cgi-bin/ directory... how do I set that in access.conf?
Who is Participating?
gunny051499Connect With a Mentor Commented:
depending on whether you are using apache 1.2.x or 1.3.x you should no more set it in access.conf, but directly in httpd.conf. anyway, it could look something like:

#this is where you execute the cgi-scripts
<Directory /your/top/directory>
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order deny,allow
        Allow from all

#this is where your cgi-scripts actualy are
ScriptAlias /cgi-bin/ /your/path/to/cgi-bin/
<Directory /your/path/to/cgi-bin>
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all

if you encounter any kind of problems, just look at apache's website <a href=http://www.apache.org>www.apache.org</a>. they have all the documentation you will need.
rqsAuthor Commented:
is this the same thing that I will use if I want to have multiple cgi-bin's in each of the
user home directories, which can be accessed with something like
you could use multiple entries like:

ScriptAlias /~username1/cgi-bin/ /your/path/to/cgi-bin/
ScriptAlias /~username2/cgi-bin/ /your/path/to/cgi-bin/

also have a look at the ScriptAliasMatch at [http://www.apache.org/docs/mod/mod_alias.html#scriptaliasmatch], however i never tried this out, so i can't tell you exactly how it works (or: how to make it work with a single line for every "~user").
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.