Jason Lim wrote:

----- Original Message ----- From: "Nestor R. Mazza" <[EMAIL PROTECTED]>
To: "DEBIAN debian-isp" <[EMAIL PROTECTED]>
Sent: 13 July, 2003 11:06 PM
Subject: cgi-bin directory under home/user/public_html



Hi


My server is ....
Debian Woody 3.0r1
Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 mod_perl/1.26

All the scripts works fine under original directories but now I want to
put the user's scripts under /home/user/public_html/cgi-bin ...

At first I put ....  /home/bodegonweb/public_html/cgi-bin/test-cgi  the
same script that works fine under /usr/lib/cgi-bin

I have red the Apache Documentation but until today I couldn't get to
works fine ...

Apache documentation says ....

There are many ways to give each user directory a cgi-bin directory such
that anything requested as http://example.com/~user/cgi-bin/program will
be executed as a CGI script. Two alternatives are:

  1.. Place the cgi-bin directory next to the public_html directory:
    ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2
  2.. Place the cgi-bin directory underneath the public_html directory:
    <Directory /home/*/public_html/cgi-bin>
        Options ExecCGI
        SetHandler cgi-script
    </Directory>
If you are using suexec, the first technique will not work because CGI
scripts must be stored under the public_html directory.

I have used the second option under the virtualhost of the user ....

#
# Dominio bodegonweb.com.ar
#

<VirtualHost 200.68.76.51>
    ServerAdmin [EMAIL PROTECTED]
    ServerName www.bodegonweb.com.ar
    DocumentRoot /home/bodegonweb/public_html
  <Directory /home/bodegonweb/public_html/cgi-bin>
    Options ExecCGI
    SetHandler cgi-script
  </Directory>

#    ErrorLog logs/host.some_domain.com-error.log
#    CustomLog logs/host.some_domain.com-access.log common
</VirtualHost>


====================== Unfortunately, if you want to use suexec, you'll need to recompile it to allow /home/*/public_html/cgi-bin/ otherwise it won't run.

Really? I have found that Woody's apache-perl package does this fine "out of the box". Unless I'm really missing something.

Nestor, give us some error log output to go on, please.


-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Reply via email to