PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : apache 2.0.47 ScriptAlias cgi-bin



Jorge
02.09.03, 17:51
Hallo,

brauch mal Hilfe. Ich habe einen Apache in der Version 2.0.47 installiert. Ich verwende eine angepasste original httpd.conf. Hier die relevanten Teile:



LoadModule cgi_module modules/mod_cgi.so

ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"

<Directory "/usr/local/apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

AddHandler cgi-script .cgi

Wie Ihr sehen könnt liegt der Alias cgi-bin nicht im htdocs und somit nicht im DocumentRoot. Wenn ich jetzt ein cgi ausführe erhalte ich folgende Ausgabe vom httpd:



500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, you@your.address and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


err_log:


[Tue Sep 02 18:40:05 2003] [error] [client 192.168.0.1] Premature end of script headers: toplinks.cgi


Google habe ich natürlich schon befragt, allerdings habe ich da nur Hinweise gefunden, in welcher der http den Scriptnamen selbst noch in der 500'er Fehlermeldung ausgibt.

Hier vielleicht noch was nützliches:


root@[cws-lx:/usr/local/apache2]# httpd -l
Compiled in modules:
core.c
prefork.c
http_core.c
mod_so.c
root@[cws-lx:/usr/local/apache2]# ll modules/
total 2.4M
-rw-r--r-- 1 root root 8.0k Aug 30 13:26 httpd.exp
-rwxr-xr-x 1 root root 1.6M Aug 30 13:42 libphp4.so
-rwxr-xr-x 1 root root 8.9k Aug 30 13:28 mod_access.so
-rwxr-xr-x 1 root root 7.6k Aug 30 13:28 mod_actions.so
-rwxr-xr-x 1 root root 12k Aug 30 13:28 mod_alias.so
-rwxr-xr-x 1 root root 7.3k Aug 30 13:28 mod_asis.so
-rwxr-xr-x 1 root root 10k Aug 30 13:28 mod_auth.so
-rwxr-xr-x 1 root root 7.5k Aug 30 13:28 mod_auth_anon.so
-rwxr-xr-x 1 root root 9.6k Aug 30 13:28 mod_auth_dbm.so
-rwxr-xr-x 1 root root 35k Aug 30 13:28 mod_auth_digest.so
-rwxr-xr-x 1 root root 35k Aug 30 13:28 mod_autoindex.so
-rwxr-xr-x 1 root root 9.0k Aug 30 13:28 mod_cern_meta.so
-rwxr-xr-x 1 root root 25k Aug 30 13:28 mod_cgi.so
-rwxr-xr-x 1 root root 150k Aug 30 13:28 mod_dav.so
-rwxr-xr-x 1 root root 54k Aug 30 13:28 mod_dav_fs.so
-rwxr-xr-x 1 root root 7.5k Aug 30 13:28 mod_dir.so
-rwxr-xr-x 1 root root 7.5k Aug 30 13:28 mod_env.so
-rwxr-xr-x 1 root root 11k Aug 30 13:28 mod_expires.so
-rwxr-xr-x 1 root root 18k Aug 30 13:28 mod_ext_filter.so
-rwxr-xr-x 1 root root 13k Aug 30 13:28 mod_headers.so
-rwxr-xr-x 1 root root 15k Aug 30 13:28 mod_imap.so
-rwxr-xr-x 1 root root 40k Aug 30 13:28 mod_include.so
-rwxr-xr-x 1 root root 16k Aug 30 13:28 mod_info.so
-rwxr-xr-x 1 root root 23k Aug 30 13:28 mod_log_config.so
-rwxr-xr-x 1 root root 17k Aug 30 13:28 mod_mime.so
-rwxr-xr-x 1 root root 27k Aug 30 13:28 mod_mime_magic.so
-rwxr-xr-x 1 root root 32k Aug 30 13:28 mod_negotiation.so
-rwxr-xr-x 1 root root 61k Aug 30 13:28 mod_rewrite.so
-rwxr-xr-x 1 root root 11k Aug 30 13:28 mod_setenvif.so
-rwxr-xr-x 1 root root 12k Aug 30 13:28 mod_speling.so
-rwxr-xr-x 1 root root 21k Aug 30 13:28 mod_status.so
-rwxr-xr-x 1 root root 10k Aug 30 13:28 mod_unique_id.so
-rwxr-xr-x 1 root root 8.6k Aug 30 13:28 mod_userdir.so
-rwxr-xr-x 1 root root 10k Aug 30 13:28 mod_usertrack.so
-rwxr-xr-x 1 root root 9.6k Aug 30 13:28 mod_vhost_alias.so
root@[cws-lx:/usr/local/apache2]# ps aux | grep apache
root 630 0.0 1.0 9508 5472 ? S Sep01 0:01 /usr/local/apache
nobody 1716 0.0 1.6 11844 8456 ? S Sep01 0:03 /usr/local/apache
nobody 1717 0.0 1.6 11884 8500 ? S Sep01 0:05 /usr/local/apache
nobody 1718 0.0 2.7 17616 14248 ? S Sep01 0:41 /usr/local/apache
nobody 1719 0.0 1.7 12384 9000 ? S Sep01 0:07 /usr/local/apache
nobody 1720 0.0 1.6 11796 8404 ? S Sep01 0:04 /usr/local/apache
nobody 1721 0.0 1.5 11512 8136 ? S Sep01 0:03 /usr/local/apache
nobody 1795 0.0 1.6 12128 8720 ? S 07:05 0:05 /usr/local/apache
root@[cws-lx:/usr/local/apache2]#


Kann jemand nen Tipp geben?

Jorge
02.09.03, 18:10
Nachtrag:

Wenn ich das Script in der commanline ausführe geht es (soll ne html Seite ausgeben). Allerdings ist der Script Header nich '#!/usr/bin/perl -W' sondern '#!/usr/bin/perl', also ohne das -W.

LINUXRH7
02.09.03, 18:18
Hallo,

schickst du denn auch schön brav einen HTML Header am Anfang an den Browser ?



print "Content-Type: text/html\n\n";
print "<html> ......usw


MfG

Jorge
02.09.03, 18:22
Oh, man!!! Habe das Script auf 755 gesetzt und was soll ich sagen! Es geht. Oh, man ist das peinlich... :(

Und weg