Salut!
Ma kinui cu o chestie care nu-mi iese. Am citit doace, arhive de mailing
listuri si tot nu m-am prins unde gresesc. Deci: am nevoie de un virtual
host care sa ruleze cu un anume uid/gid.
Liniile relevante din configurari sunt:
[httpd.conf]
Port 80
User apache
Group apache
NameVirtualHost 193.226.26.104
<VirtualHost 193.226.26.111:80>
DocumentRoot "/home/staff/radu/public/web/socrate_online/html/"
ServerName socrate.tuiasi.ro
ServerAdmin [EMAIL PROTECTED]
User radu
Group radu
<Directory "/home/staff/radu/public/web/socrate_online/html">
Options All
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/home/staff/radu/public/web/socrate_online/html/cgi-bin/"
<Directory "/home/staff/radu/public/web/socrate_online/html/cgi-bin/">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
[radu@gamma radu]$ id apache
uid=80(apache) gid=80(apache) groups=80(apache)
[radu@gamma radu]$ id radu
uid=1013(radu) gid=7602(radu) groups=7602(radu)
[radu@gamma radu]$ ls -ld /home /home/staff ~ ~/public/ ~/public/web/ \
~/public/web/socrate_online ~/public/web/socrate_online/html \
~/public/web/socrate_online/html/cgi-bin/ \
~/public/web/socrate_online/html/cgi-bin/test.cgi
drwxr-xr-x 26 root root 4096 Mar 14 13:51 /home/
drwxr-xr-x 18 root root 4096 Mar 13 02:05 /home/staff/
drwx--x--x 35 radu radu 4096 Mar 14 15:06 /home/staff/radu/
drwx--x--x 4 radu radu 4096 Mar 14 15:01 /home/staff/radu/public/
drwx--x--x 5 radu radu 4096 Mar 7 18:49 /home/staff/radu/public/web/
drwx--x--x 10 radu radu 4096 Mar 14 15:04
/home/staff/radu/public/web/socrate_online/
drwx--x--x 8 radu radu 4096 Mar 14 15:04
/home/staff/radu/public/web/socrate_online/html/
drwx--x--x 3 radu radu 4096 Mar 14 13:58
/home/staff/radu/public/web/socrate_online/html/cgi-bin/
-rwxr-xr-x 1 radu radu 72 Mar 14 14:00
/home/staff/radu/public/web/socrate_online/html/cgi-bin/test.cgi*
[radu@gamma radu]$ cat public/web/socrate_online/html/cgi-bin/test.cgi
#!/bin/bash
echo -ne "Content-type: text/html\n\n"
echo -ne "merge\n"
id
[radu@gamma radu]$ ls -ld /usr/sbin/suexec
-rwsr-xr-x 1 root root 11036 Oct 19 01:31 /usr/sbin/suexec*
[radu@gamma radu]$ tail -f /var/log/httpd/error_log
[Wed Mar 14 15:04:49 2001] [notice] Apache/1.3.14 (Unix) (Red-Hat/Linux)
PHP/4.0.4pl1 mod_perl/1.24 configured -- resuming normal operations
[Wed Mar 14 15:04:49 2001] [notice] suEXEC mechanism enabled (wrapper:
/usr/sbin/suexec)
So far so good.
Acum, cand incerc sa apelez scriptul cu pricina:
[radu@gamma radu]$ lynx socrate.tuiasi.ro/cgi-bin/test.cgi
Alert!: HTTP/1.1 500 Internal Server Error
iar in /var/log/httpd/suexec_log gasesc:
[radu@gamma radu]$ tail -f /var/log/httpd/suexec_log
[2001-03-14 15:16:43]: error: command not in docroot
(/home/staff/radu/public/web/socrate_online/html/cgi-bin/test.cgi)
Am tot invartit-o pe toate fetzele dar nu m-am prins. Ideea e ca daca in
VirtualHost comentez directivele User si Group atunci scriptul merge dar
rulat ca user apache/apache (normal). Dar eu am nevoie ca serverul virtual
sa mearga cu Directivele User si Group! Ce naiba vrea sa spuna cu "command
not in docroot"?
Ma poate ajuta cineva?
Apache este versiunea
[radu@gamma radu]$ rpm -q apache
apache-1.3.14-3
rulat pe un RH 7.0/i386
Multumesc,
Radu Filip
--
Radu Filip
Network Administrator @ Technical University of Iasi
[EMAIL PROTECTED] Information Technology and Communication Center
http://socrate.tuiasi.ro/ [EMAIL PROTECTED] | http://www.ccti.tuiasi.ro/
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.