#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    79
    Rep Power
    15
    Our students have their own virtual space of WWW homepage in /home/userID/html/,
    Their URL are http://aaa.com/~userID/
    Now we need to set CGI execable for each directory of users in a subdirectory.
    The URL is http://aaa.com/~userID/cgi-bin/
    Therefore we add a Directory tag in httpd.conf,
    --Directory "/home/*/html/cgi-bin-------
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
    --Directory-----------------------------
    When we run hello.pl using browser, http://aaa.com/userID/cgi-bin/hello.pl
    but the browser print the source code of hello.pl.
    What should we do ?
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    # add this line to your httpd.conf

    AddHandler cgi-script .pl .cgi
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    79
    Rep Power
    15
    I have these line in htt[d.conf:
    -Directory /home/*/html-
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    -Limit GET POST OPTIONS PROPFIND-
    Order allow,deny
    Allow from all
    -/Limit-
    -LimitExcept GET POST OPTIONS PROPFIND-
    Order deny,allow
    Deny from all
    -/LimitExcept-
    -/Directory-

    AddHandler cgi-script .cgi .pl
    ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/"

    -Directory "/home/httpd/cgi-bin"-
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
    -/Directory-

    -Directory "/home/*/html/cgi"-
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
    -/Directory-
    The result is:
    HTTP/1.1 200 OK Date: Thu, 18 May 2000 08:14:27 GMT Server: Apache/1.3.12 (Unix) PHP/4.0RC2 mod_layout/1.6 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
    OK
    You don't have permission to access /~gigi/cgi/hello.pl on this server.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    79
    Rep Power
    15
    It's work
    /home/*/html/cgi/hello.pl ----200 OK(Error)
    /home/*/html/cgi/hello.cgi ---It's work
    But I don't know why
    Because
    /home/httpd/cgi-bin/hello.pl --- It's work

IMN logo majestic logo threadwatch logo seochat tools logo