CGI & Tux

Chris Davies mcd at daviesinc.com
Sat Apr 24 04:50:04 UTC 2004


I'm missing something basic, I know it.  I've documented the options
that appear to be relevent, and can post whatever other config
information might be needed.

Kernel 2.6.6-rc2-mm1-tux3 and 2.4.26-ow1-tux3
tux 3.2.16 userspace

DOCUMENTROOT=/var/www
CGIROOT=/  (for testing, I'll chroot it properly once I get it working)

set in sysctl.tux, verified
net/tux/virtual_server = 1
net/tux/cgi_gid = 33
net/tux/cgi_uid = 33

/etc/tux.mime.types
TUX/CGI                         cgi pl
Have also tried, just cgi, just pl

/var/www/test.com does exist, owned by www-data.www-data (just in case)
drwxr-xr-x    3 www-data www-data      116 Apr 23 22:30 test.com

-rwxr-xr-x    1 www-data www-data   424776 Apr 24 00:12 a.cgi
-rwxr-xr-x    1 www-data www-data       73 Apr 23 22:30 j.pl
-rwxr-xr-x    1 www-data www-data       68 Apr 23 21:45 test.cgi

gcc -o a.cgi -static a.c (just to ensure no dependencies)

/var/www/test.com# ./a.cgi 
Content-type: text/html

C Program

mcd at mcdlp:~$ telnet 192.168.24.102 80
Trying 192.168.24.102...
Connected to 192.168.24.102.
Escape character is '^]'.
GET /a.cgi HTTP/1.1
Host: test.com

HTTP/1.1 200 OK
Connection: close
Server: TUX/2.0 (Linux)
Connection closed by foreign host.

host not defined, tux is finding the right file

mcd at mcdlp:~$ telnet 192.168.24.102 80
Trying 192.168.24.102...
Connected to 192.168.24.102.
Escape character is '^]'.
GET /a.cgi HTTP/1.0
Host: xxxx.com

Connection closed by foreign host.

Trying 192.168.24.102...
Connected to 192.168.24.102.
Escape character is '^]'.
GET /test.cgi HTTP/1.0
Host: test.com

HTTP/1.1 200 OK
Content-Type: text/plain
Date: Sat, 24 Apr 2004 04:15:47 GMT
Server: TUX/2.0 (Linux)
Content-Length: 68

#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "asdf";
Connection closed by foreign host.

test.cgi
#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "asdf";

a.c
#include <stdio.h>

int main() {

printf("Content-type: text/html\n\n");
printf("C Program\n");

}

j.pl

#!/usr/bin/perl

print "Content-type: text/html\n\n";

print "asdfasdf";

I've googled but have found a host of other posts asking the same
question. I've got the printk debugging and dprintk on, but they haven't
yielded too many clues.

Any help would greatly be appreciated.  Thank you.

--Chris Davies
http://www.daviesinc.com/





More information about the tux-list mailing list