in reply to Re^2: Enabling CGI Script from Apache's htdocs directory
in thread Enabling CGI Script from Apache's htdocs directory

Because there will be many webapps I need to build (hence many subdirectory other than "Test"). I've tried to modified the following httpd.conf entry:
#ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/" # into ScriptAlias /cgi-bin/ "/usr/local/apache/htdocs/cgi-bin/

Note that there's the ending quote missing. But this modification would allow you to access scripts in /usr/local/apache/htdocs/cgi-bin/hello.cgi as

http://bioinfo-z.comp.nus.edu.sg/cgi-bin/hello.cgi

Try

ScriptAlias /Test/cgi-bin/ /usr/local/apache/htdocs/Test/cgi-bin/ ScriptAlias /Webap1/cgi-bin/ /usr/local/apache/htdocs/Webap1/cgi-bin/ ScriptAlias /Webap2/cgi-bin/ /usr/local/apache/htdocs/Webap2/cgi-bin/

inside your <IfModule alias_module></IfModule> block.

You could also omit the cgi-bin part

ScriptAlias /Test/ /usr/local/apache/htdocs/Test/cgi-bin/ ScriptAlias /Webap1/ /usr/local/apache/htdocs/Webap1/cgi-bin/ ScriptAlias /Webap2/ /usr/local/apache/htdocs/Webap2/cgi-bin/

to access e.g /usr/local/apache/htdocs/Webap1/cgi-bin/hello.cgi as

http://bioinfo-z.comp.nus.edu.sg/Webap1/hello.cgi

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}