Women in Technology

Hear us Roar



Article:
  Apache Web-Serving with Mac OS X: Part 2
Subject:   CGI - ScriptAliasMatch
Date:   2002-03-11 13:00:22
From:   kenyatta
I was trying to figure out how to allow all my users /cgi-bin/ directories to permit cgi scripts. I came across the ScriptAliasMatch directive from the apache website.
There was a small tutorial that used pattern matching to catch /Users/(any user)/Sites/cgi-bin/(any script) I tested the printenv and test-cgi scripts from the /Library/WebServer/CGI-Executables/


-- the printenv script worked
-- but the test-cgi script gave me an Internal Server Error.
I checked the error_log, it said
"malformed header from script. Bad header=bootstrap_look_up() failed"


-- Anybody got a clue ?
I know that the printenv is a perl script, and test-cgi is a tcsh script, and all the permissions are fine.
-- I got the same error on a networked computer with 2 different users (1 is an administrator -although I doubt that matters)



----------------------------
ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /Users/$1/Sites/cgi-bin/$2
<Directory /Users/*/Sites/cgi-bin/>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>


Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Morbus Iff photo CGI - ScriptAliasMatch
    2002-03-11 17:05:32  Morbus Iff | O'Reilly Author [View]

    kenyatta, the error that you're seeing isn't related to what you're doing with the ScriptAliasMatch - the error seems to be pretty common (a number of other people have told me about it). I can't duplicate it, and I've never seen the error before. I haven't had the time to Google for an answer either.

    Regardless, based on what you've got for ScriptAliasMatch, you should be all set for Perl scripts (I've yet to run across a production level tcsh script to run over CGI).
    • CGI - ScriptAliasMatch (THANKS!!)
      2002-03-11 17:24:41  kenyatta [View]

      Thanks for the info!