[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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
webmaster@asdgroup.com.ar
    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>

I'll apprecite your cooperation
Regards
Nestor Mazza
asd-vtas@movi.com.ar


Reply to: