busybox httpd cgi cgi-bin
cheesiong
bluecolour.sz at gmail.com
Wed May 7 02:33:49 PDT 2008
hi Denys,
thank you.
i hardly understand what is in the httpd.log. please have a look on the
httpd.log generated from the method you guide me when you are free. thank
you.
i will try the busybox example and send in the next email due to the output
is lengthy.
thank you very much.
2772 execve("./busybox", ["./busybox", "httpd", "-vvv", "-h", "www", "-c",
"/home/keo/busybox/www/httpd.conf"], [/* 47 vars */]) = 0
2772 uname({sys="Linux", node="fedora8.est.com", ...}) = 0
2772 brk(0) = 0x8639000
2772 brk(0x8639cd0) = 0x8639cd0
2772 set_thread_area({entry_number:-1 -> 6, base_addr:0x8639850,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}) = 0
2772 brk(0x865acd0) = 0x865acd0
2772 brk(0x865b000) = 0x865b000
2772 getcwd("/home/keo/busybox", 192) = 18
2772 brk(0x865a000) = 0x865a000
2772 chdir("www") = 0
2772 rt_sigaction(SIGCHLD, {SIG_IGN}, {SIG_DFL}, 8) = 0
2772 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
2772 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
2772 bind(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("
0.0.0.0")}, 16) = 0
2772 listen(3, 9) = 0
2772 open("/home/keo/busybox/www/httpd.conf", O_RDONLY) = 4
2772 fstat64(4, {st_mode=S_IFREG|0744, st_size=2529, ...}) = 0
2772 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f29000
2772 read(4, "#\r\n# httpd.conf - BusyBox v1.00 "..., 4096) = 2529
2772 read(4, "", 4096) = 0
2772 close(4) = 0
2772 munmap(0xb7f29000, 4096) = 0
2772 open("/dev/null", O_RDWR) = 4
2772 clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x8639898) = 2773
2773 setsid() = 2773
2773 dup2(4, 0) = 0
2773 dup2(4, 1) = 1
2773 dup2(4, 2) = 2
2773 close(4) = 0
2773 accept(3, <unfinished ...>
2772 exit_group(0) = ?
2773 <... accept resumed> {sa_family=AF_INET, sin_port=htons(1268),
sin_addr=inet_addr("10.104.9.53")}, [16]) = 4
2773 setsockopt(4, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
2773 clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x8639898) = 2775
2775 close(3) = 0
2775 dup2(4, 0) = 0
2775 close(4) = 0
2775 dup2(0, 1) = 1
2773 close(4) = 0
2773 accept(3, <unfinished ...>
2775 write(2, "10.104.9.53:1268: connected\n", 28) = 28
2775 rt_sigaction(SIGALRM, {0x80ba0da, [], 0}, NULL, 8) = 0
2775 alarm(60) = 0
2775 read(0, "GET /form-post.html HTTP/1.1\r\nUs"..., 8193) = 367
2775 stat64("form-post.html", {st_mode=S_IFREG|0777, st_size=747, ...}) = 0
2775 write(2, "10.104.9.53:1268: url:/form-post"..., 38) = 38
2775 alarm(60) = 60
2775 alarm(60) = 60
2775 alarm(60) = 60
2775 alarm(60) = 60
2775 alarm(60) = 60
2775 alarm(60) = 60
2775 alarm(60) = 60
2775 alarm(0) = 60
2775 stat64("form-post.html", {st_mode=S_IFREG|0777, st_size=747, ...}) = 0
2775 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
2775 open("form-post.html", O_RDONLY) = 3
2775 time(NULL) = 1210146242
2775 write(2, "10.104.9.53:1268: response:200\n", 31) = 31
2775 open("/etc/localtime", O_RDONLY) = 4
2775 fstat64(4, {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
2775 fstat64(4, {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
2775 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f29000
2775 read(4,
"TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\3\0\0\0\0"..., 4096) =
1135
2775 _llseek(4, -7, [1128], SEEK_CUR) = 0
2775 read(4, "\nHKT-8\n", 4096) = 7
2775 close(4) = 0
2775 munmap(0xb7f29000, 4096) = 0
2775 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) =
0
2775 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) =
0
2775 write(1, "HTTP/1.0 200 OK\r\nContent-type: t"..., 167) = 167
2775 read(3, "<html>\r\n<head>\r\n<title>CGI Test<"..., 8192) = 747
2775 write(1, "<html>\r\n<head>\r\n<title>CGI Test<"..., 747) = 747
2775 read(3, "", 8192) = 0
2775 shutdown(1, 1 /* send */) = 0
2775 fcntl64(0, F_GETFL) = 0x2 (flags O_RDWR)
2775 fcntl64(0, F_SETFL, O_RDWR|O_NONBLOCK) = 0
2775 read(0, "", 8192) = 0
2775 write(2, "10.104.9.53:1268: closed\n", 25) = 25
2775 exit_group(0) = ?
2773 <... accept resumed> {sa_family=AF_INET, sin_port=htons(1269),
sin_addr=inet_addr("10.104.9.53")}, [16]) = 4
2773 setsockopt(4, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
2773 clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x8639898) = 2776
2776 close(3) = 0
2776 dup2(4, 0) = 0
2776 close(4) = 0
2776 dup2(0, 1) = 1
2776 write(2, "10.104.9.53:1269: connected\n", 28) = 28
2776 rt_sigaction(SIGALRM, {0x80ba0da, [], 0}, NULL, 8) = 0
2776 alarm(60) = 0
2776 read(0, "POST /cgi-bin/test-post HTTP/1.1"..., 8193) = 588
2776 stat64("cgi-bin/test-post", <unfinished ...>
2773 close(4) = 0
2773 accept(3, <unfinished ...>
2776 <... stat64 resumed> {st_mode=S_IFREG|0777, st_size=591, ...}) = 0
2776 write(2, "10.104.9.53:1269: url:/cgi-bin/t"..., 41) = 41
2776 stat64("cgi-bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
2776 open("cgi-bin/httpd.conf", O_RDONLY) = -1 ENOENT (No such file or
directory)
2776 alarm(60) = 60
2776 alarm(60) = 60
2776 alarm(60) = 60
2776 alarm(60) = 60
2776 alarm(60) = 60
2776 alarm(60) = 60
2776 alarm(60) = 60
2776 alarm(60) = 60
2776 alarm(60) = 60
2776 alarm(60) = 60
2776 alarm(60) = 60
2776 alarm(0) = 60
2776 stat64("cgi-bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
2776 pipe([3, 4]) = 0
2776 pipe([5, 6]) = 0
2776 vfork() = 2777
2777 close(6) = 0
2777 close(3) = 0
2777 dup2(5, 0) = 0
2777 close(5) = 0
2777 dup2(4, 1) = 1
2777 close(4) = 0
2777 chdir("www/cgi-bin") = -1 ENOENT (No such file or
directory)
2777 write(2, "10.104.9.53:1269: chdir www/cgi-"..., 63) = 63
2777 time(NULL) = 1210146248
2777 write(2, "10.104.9.53:1269: response:404\n", 31) = 31
2777 open("/etc/localtime", O_RDONLY) = 3
2777 fstat64(3, {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
2777 fstat64(3, {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
2777 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f29000
2777 read(3,
"TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\3\0\0\0\0"..., 4096) =
1135
2777 _llseek(3, -7, [1128], SEEK_CUR) = 0
2777 read(3, "\nHKT-8\n", 4096) = 7
2777 close(3) = 0
2777 munmap(0xb7f29000, 4096) = 0
2777 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) =
0
2777 write(1, "HTTP/1.0 404 Not Found\r\nContent-"..., 231) = 231
2777 shutdown(1, 1 /* send */) = -1 ENOTSOCK (Socket operation on
non-socket)
2777 fcntl64(0, F_GETFL) = 0 (flags O_RDONLY)
2777 fcntl64(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
2777 read(0, 0x8639fe8, 8192) = -1 EAGAIN (Resource temporarily
unavailable)
2777 write(2, "10.104.9.53:1269: closed\n", 25) = 25
2777 exit_group(242) = ?
2776 close(4) = 0
2776 close(5) = 0
2776 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
2776 poll([{fd=0, events=0}, {fd=3, events=POLLIN, revents=POLLIN|POLLHUP},
{fd=6, events=POLLOUT, revents=POLLOUT|POLLERR}], 3, -1) = 2
2776 write(6, "Text_Field=fdsfdsfds&Radio_Butto"..., 68) = -1 EPIPE (Broken
pipe)
2776 --- SIGPIPE (Broken pipe) @ 0 (0) ---
2776 read(3, "HTTP/1.0 404 Not Found\r\nContent-"..., 4088) = 231
2776 write(1, "HTTP/1.0 404 Not Found\r\nContent-"..., 231) = 231
2776 close(6) = 0
2776 poll([{fd=0, events=0}, {fd=3, events=POLLIN, revents=POLLHUP}, {fd=6,
events=0, revents=POLLNVAL}], 3, -1) = 2
2776 write(0, "", 0) = 0
2776 read(3, "", 4096) = 0
2776 shutdown(1, 1 /* send */) = 0
2776 fcntl64(0, F_GETFL) = 0x2 (flags O_RDWR)
2776 fcntl64(0, F_SETFL, O_RDWR|O_NONBLOCK) = 0
2776 read(0, "", 8192) = 0
2776 write(2, "10.104.9.53:1269: closed\n", 25) = 25
2776 exit_group(0) = ?
2773 <... accept resumed> {sa_family=AF_INET, sin_port=htons(52662),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 4
2773 setsockopt(4, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
2773 clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x8639898) = 2923
2773 close(4) = 0
2773 accept(3, <unfinished ...>
2923 close(3) = 0
2923 dup2(4, 0) = 0
2923 close(4) = 0
2923 dup2(0, 1) = 1
2923 write(2, "127.0.0.1:52662: connected\n", 27) = 27
2923 rt_sigaction(SIGALRM, {0x80ba0da, [], 0}, NULL, 8) = 0
2923 alarm(60) = 0
2923 read(0, "GET /drupal/cron.php HTTP/1.0\r\nU"..., 8193) = 131
2923 stat64("drupal/cron.php", 0xbffe0df4) = -1 ENOENT (No such file or
directory)
2923 write(2, "127.0.0.1:52662: url:/drupal/cro"..., 38) = 38
2923 stat64("drupal", 0xbffe0df4) = -1 ENOENT (No such file or
directory)
2923 alarm(60) = 60
2923 alarm(60) = 60
2923 alarm(60) = 60
2923 alarm(60) = 60
2923 alarm(60) = 60
2923 alarm(0) = 60
2923 stat64("drupal/cron.php", 0xbffe0e60) = -1 ENOENT (No such file or
directory)
2923 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
2923 open("drupal/cron.php", O_RDONLY) = -1 ENOENT (No such file or
directory)
2923 time(NULL) = 1210147262
2923 write(2, "127.0.0.1:52662: response:404\n", 30) = 30
2923 open("/etc/localtime", O_RDONLY) = 3
2923 fstat64(3, {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
2923 fstat64(3, {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
2923 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f29000
2923 read(3,
"TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\3\0\0\0\0"..., 4096) =
1135
2923 _llseek(3, -7, [1128], SEEK_CUR) = 0
2923 read(3, "\nHKT-8\n", 4096) = 7
2923 close(3) = 0
2923 munmap(0xb7f29000, 4096) = 0
2923 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) =
0
2923 write(1, "HTTP/1.0 404 Not Found\r\nContent-"..., 231) = 231
2923 shutdown(1, 1 /* send */) = 0
2923 fcntl64(0, F_GETFL) = 0x2 (flags O_RDWR)
2923 fcntl64(0, F_SETFL, O_RDWR|O_NONBLOCK) = 0
2923 read(0, 0x8639fe8, 8192) = -1 EAGAIN (Resource temporarily
unavailable)
2923 write(2, "127.0.0.1:52662: closed\n", 24) = 24
2923 exit_group(0) = ?
2773 <... accept resumed> {sa_family=AF_INET, sin_port=htons(49583),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 4
2773 setsockopt(4, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
2773 clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x8639898) = 3086
2773 close(4) = 0
2773 accept(3, <unfinished ...>
3086 close(3) = 0
3086 dup2(4, 0) = 0
3086 close(4) = 0
3086 dup2(0, 1) = 1
3086 write(2, "127.0.0.1:49583: connected\n", 27) = 27
3086 rt_sigaction(SIGALRM, {0x80ba0da, [], 0}, NULL, 8) = 0
3086 alarm(60) = 0
3086 read(0, "GET /drupal/cron.php HTTP/1.0\r\nU"..., 8193) = 131
3086 stat64("drupal/cron.php", 0xbffe0df4) = -1 ENOENT (No such file or
directory)
3086 write(2, "127.0.0.1:49583: url:/drupal/cro"..., 38) = 38
3086 stat64("drupal", 0xbffe0df4) = -1 ENOENT (No such file or
directory)
3086 alarm(60) = 60
3086 alarm(60) = 60
3086 alarm(60) = 60
3086 alarm(60) = 60
3086 alarm(60) = 60
3086 alarm(0) = 60
3086 stat64("drupal/cron.php", 0xbffe0e60) = -1 ENOENT (No such file or
directory)
3086 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
3086 open("drupal/cron.php", O_RDONLY) = -1 ENOENT (No such file or
directory)
3086 time(NULL) = 1210150863
3086 write(2, "127.0.0.1:49583: response:404\n", 30) = 30
3086 open("/etc/localtime", O_RDONLY) = 3
3086 fstat64(3, {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
3086 fstat64(3, {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
3086 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f29000
3086 read(3,
"TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\3\0\0\0\0"..., 4096) =
1135
3086 _llseek(3, -7, [1128], SEEK_CUR) = 0
3086 read(3, "\nHKT-8\n", 4096) = 7
3086 close(3) = 0
3086 munmap(0xb7f29000, 4096) = 0
3086 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) =
0
3086 write(1, "HTTP/1.0 404 Not Found\r\nContent-"..., 231) = 231
3086 shutdown(1, 1 /* send */) = -1 ENOTCONN (Transport endpoint is
not connected)
3086 fcntl64(0, F_GETFL) = 0x2 (flags O_RDWR)
3086 fcntl64(0, F_SETFL, O_RDWR|O_NONBLOCK) = 0
3086 read(0, 0x8639fe8, 8192) = -1 ECONNRESET (Connection reset by
peer)
3086 write(2, "127.0.0.1:49583: closed\n", 24) = 24
3086 exit_group(0) = ?
On Tue, May 6, 2008 at 8:42 PM, Denys Vlasenko <vda.linux at googlemail.com>
wrote:
> On Monday 05 May 2008 04:49, cheesiong wrote:
> > i copy 2 files from internet. www/form-post.html and cgi-bin/test-post
> > but when i submit in the form-post.html which pass to test-post i get
> >
> > 404 Not Found
> >
> > The requested URL was not found
>
> run it under strace:
>
> strace -f -o httpd.log ./busybox httpd -vvv -h www -c $PWD/www/httpd.conf
>
> and see what file it is trying to open.
>
> Also try the example from
>
>
> http://busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/networking/httpd_post_upload.txt
>
> (click "view" link on that page)
> --
> vda
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/busybox/attachments/20080507/af4ea2a0/attachment-0001.htm
More information about the busybox
mailing list