Ich versuche schon seit längerem das CGI-Problem in Verbindung mit dem Apachen in den Griff zu bekommen und habe da auch schon unzählige Tools probiert, keine Besserung. Ich meine das Problem, daß CGIs, die in perl geschrieben sind, mit den Rechten des Apachen laufen.
CGIWRAP soll da Abhilfe schaffen, nur läuft das nicht so recht.
Vielleicht ist hier jemand, der bereit ist mir einmal zu erklären was ich falsch bei der Konfig mache?
Ich bin so vorgegangen:
Das Modul mod_cgiwrap.c besorgt und mit apxs in den Apachen als Modul einkompiliert, die httpd.conf entsprechend angepasst.
Nun habe ich mir noch das aktuelle Paket cgiwrap-3.9 für mod_cgiwrap besorgt und mit diesen Optionen kompiliert und installiert:
Code: Select all
./configure --with-perl=/usr/bin/perl --with-install-dir=/usr/sbin --with-cgi-dir=/cgi-bin --with-httpd-user=wwwrun --with-check-shell --with-minimum-uid=631 --with-minimum-gid=101 --with-logging-syslog=info --with-logging-file=/var/log/httpd/cgiwrap_log --without-redirect-stderr --with-php=/usr/share/php --with-php-interpreter --with-rlimit-cpu=60 --with-docroot-mode --with-docroot-owner --with-wallCode: Select all
AddHandler cgi-script .cgi .pl .py
AddHandler cgi-script-debug .cgid Code: Select all
##########################################
#Docroot
/srv/www
#
LoadModule cgiwrap_module /usr/lib/apache/mod_cgiwrap.so
#
AddModule mod_cgiwrap.c
#
#
# set /cgi-bin for CGI execution
#
<Location /cgi-bin>
AllowOverride None
Options +ExecCGI +IncludesNoExec
SetHandler cgi-script
</Location>
#
AddHandler cgi-script .cgi .pl .py
AddHandler cgi-script-debug .cgid
#
#Code: Select all
<VirtualHost IP-Adresse:80>
ServerName web2.domain.de
DocumentRoot /home/www/web2/html
ServerAlias web2.domain.de
ScriptAlias /cgi-bin/ /home/www/web2/html/cgi-bin/
#User web2
#Group ftponly
php_admin_value open_basedir /home/www/web2/
php_admin_value upload_tmp_dir /home/www/web2/phptmp/
</VirtualHost>Code: Select all
CGIWrap Error: User not found
--------------------------------------------------------------------------------
CGIWrap was unable to find the user '-' in the password file on this server.
Check the URL and try again.
Server Data:
Server Administrator/Contact: webmaster@domain.de
Server Name: web2.domain.de
Server Port: 80
Server Protocol: HTTP/1.1
Virtual Host: web2.domain.de
Request Data:
User Agent/Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Request Method: GET
Remote Address: 80.143.248.118
Remote Port: 3942
Extra Path Info: /-/cgi-bin/env.cgiCode: Select all
CGIWrap was unable to find the user '-' in the password file on this server.Dann kommt noch dazu, daß wenn ich in der confixx_vhost.conf die Rauten davor entferne:
Code: Select all
User web2
Group ftponlyCode: Select all
Script Error
The script did not produce proper HTTP headers. Please see the error log to see the detail of the errors. Depending on the server configuration, you can also run this script under CGIWrap debugging. Usually, either rename or link the script temporarily to a file which ends with .cgid extension, or add a AddHandler cgi-script-debug .cgi line to your .htaccess file.MFG
footh