Hi,
mein Problem liegt daran, dass der httpd die Fehlermeldung Nr. 500 zurück gibt obwohl alle Benuzerrechte gesetzt sind und das CGI Module eigentlich funktionieren sollte.

hier mal ein Ausschnitt aus meiner httpd.conf.
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
LoadModule cgi_module modules/mod_cgi.so
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
AllowOverride None
Options +ExecCGI
AddHandler cgi-script .cgi .pl
Order allow,deny
Allow from all
</Directory>
|
Das cgi-bin Verzeichnis hat die Rechte "777" und die test Datei hat die Rechte "755". Sie gehören beide dem User root und der Gruppe root.
Hier meine letzte Fehlermeldung.
[Sun Dec 04 16:34:45 2005] [error] [client 84.145.218.195] (

Exec format error: exec of '/var/www/cgi-bin/test' failed
[Sun Dec 04 16:34:45 2005] [error] [client 84.145.218.195] Premature end of script headers: test
... und hier das Test Script:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/* browser.c */
#include <stdio.h>
#include <stdlib.h>
/* Die Kopfzeile eines Standard-HTML-Dokuments
* titel: String, der als Titel erscheinen soll
*/
void print_html_header(char *titel) {
printf("<html><head>\n");
printf("<title>%s</title>\n",titel);
printf("</head><body><pre>\n");
}
/* Das Ende eines HTML-Dokuments */
void print_html_end(void) {
printf("</pre></body></html>\n");
}
/* Damit überhaupt ein HTML-Dokument ausgegeben wird */
void print_header(void) {
printf("Content-Type: text/html\n\n");
}
int main(void) {
char *p;
print_header();
print_html_header("Wer bin ich?");
p = getenv("HTTP_USER_AGENT");
if(p!=NULL) {
printf("Sie browsen mit : %s\n", p);
} else {
printf("Konnte HTTP_USER_AGENT nicht ermitteln!\n");
}
print_html_end();
return EXIT_SUCCESS;
}
|