Women in Technology

Hear us Roar



Article:
  Apache Web-Serving with Mac OS X: Part 2
Subject:   Adding another directory. . . ?
Date:   2001-12-27 11:31:58
From:   kenyatta
Let's say I want to add another directory in addition to the /Library/WebServer/CGI- Executables directory? Let's say i want to add this directory:
/Users/Mike/Sites/cgi-bin


how would I add it? like this?? (this syntax works fine, but doesn't work... I don't want to uncomment the AddHandler line
#AddHandler cgi-script .cgi
---------------------------------------------------
<Directory "/Library/WebServer/CGI-Executables">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>



<Directory "/Users/kniles/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 Adding another directory. . . ?
    2001-12-27 12:17:35  Morbus Iff | O'Reilly Author [View]

    You're missing a key ingredient: "ScriptAlias", which tells Apache what files under what directories should be executed as CGI files.

    ScriptAlias is crucial to use when you're not going to use the AddHandler directives. I'd modify your above <Directory> to:

    ScriptAlias /cgi-bin/ "/Users/kniles/Sites/cgi-bin"
    <Directory "/Users/kniles/Sites/cgi-bin">
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
    </Directory>
    • Adding another directory. . . ?
      2002-01-25 12:07:12  haymaker [View]

      I was wondering how to do this too. Thanks!!

      I'd also like to say how great this series has been - I knew absolutely NOTHING about apache or unix before reading these articles, and now I'm configuring my own web server! Thanks for making this stuff approachable.

      -Chris