Discussion:
[BusyBox] busybox httpd
Luke Fimmerzane
21 years ago
Permalink
Hi,
Can someone give me some pointers as to how I can get httpd working on my
Arm target. I am using BusyBox v1.00-rc3. I apologise if these 3 questions
are simple:

(1) httpd applet is built but it doesn't seem to support -p option. Is there
a config option I've missed.
e.g. when I do httpd --help I get

BusyBox v1.00-rc3 (2004.09.02-15:54+0000) multi-call binary

Usage: httpd [-c <conf file>] [-r <realm>] [-m pass] [-h home] [-d/-e
<string>]

Listens for incoming http server requests.

Options:
-c FILE Specifies configuration file. (default httpd.conf)
-r REALM Authentication Realm for Basic Authentication
-m PASS Crypt PASS with md5 algorithm
-h HOME Specifies http HOME directory (default ./)
-e STRING Html encode STRING
-d STRING URL decode STRING
(2) If I run it from command line it stops running e.g. if I do a ps aux
after running it,
this is what I get:


httpd &
~ # ps aux
PID Uid VmSize Stat Command
1 root 276 S init
2 root SW [keventd]
3 root SWN [ksoftirqd_CPU0]
4 root SW [kswapd]
5 root SW [bdflush]
6 root SW [kupdated]
8 root SW [mtdblockd]
9 root SW [rpciod]
17 root 528 S /sbin/inetd
77 root 644 S /sbin/cardmgr -d
95 root 356 S /bin/sh
169 root 240 T httpd
170 root 284 R ps aux
[1] + Stopped (tty input) httpd

(3) My httpd.conf file is as follows. I took it from source file. Is there
an example somewhere of what
this should look like? I've searched every entry in busybox mail list and
could not find any reference apart from see source file, which isn't very
useful.

more httpd.conf
A:127.0.0.1
A:10.7.10.0/25
D:*
/cgi-bin:foo:bar
/adm:admin:setup

Thanks for any help,
Luke

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo
Hiroshi Ito
21 years ago
Permalink
Hi,

From: "Luke Fimmerzane" <***@hotmail.com>
Subject: [BusyBox] busybox httpd
Date: Thu, 04 Nov 2004 01:03:09 +0000
Post by Luke Fimmerzane
Hi,
Can someone give me some pointers as to how I can get httpd working on my
Arm target. I am using BusyBox v1.00-rc3. I apologise if these 3 questions
(1) httpd applet is built but it doesn't seem to support -p option. Is there
a config option I've missed.
follows are picked up from "make menuconfig"
Support using httpd only from inetd

CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY:
This option disables uid and port options for the httpd applet
but requires inetd server daemon.

This option disables -p.
Post by Luke Fimmerzane
(2) If I run it from command line it stops running e.g. if I do a ps aux
after running it,
Yes, and httpd reads request from stdin, and prints result to stdout.
/tmp # httpd
get / <= I typed in from kyboard.
HTTP/1.0 403 Forbidden
Content-type: text/html
Date: Thu, 04 Nov 2004 04:02:09 GMT
Connection: close

<HEAD><TITLE>403 Forbidden</TITLE></HEAD>
<BODY><H1>403 Forbidden</H1>

</BODY>
/tmp #
put a following line to /etc/inetd.conf,
www stream tcp nowait root /usr/sbin/httpd httpd -h /www

and, restart inetd
It will work.

--------
Hiroshi Ito
Media Lab. Inc.,
URL http://www.mlb.co.jp ( Sorry, Japanese only. )
TEL +81-3-5294-7255 FAX +81-3-5294-7256
Vladimir N. Oleynik
21 years ago
Permalink
Hiroshi,
Post by Hiroshi Ito
put a following line to /etc/inetd.conf,
www stream tcp nowait root /usr/sbin/httpd httpd -h /www
But more secure if make change "root" to "www.www"
(and make www user and group).
Post by Hiroshi Ito
and, restart inetd
as kill SIGHUP


--w
vodz
Hiroshi Ito
21 years ago
Permalink
From: "Vladimir N. Oleynik" <***@simtreas.ru>
Subject: Re: [BusyBox] busybox httpd
Date: Thu, 04 Nov 2004 08:05:19 +0300
Post by Vladimir N. Oleynik
Hiroshi,
Post by Hiroshi Ito
put a following line to /etc/inetd.conf,
www stream tcp nowait root /usr/sbin/httpd httpd -h /www
But more secure if make change "root" to "www.www"
(and make www user and group).
Yes, you are right.
and
chown www.www /etc/httpd.conf
chmod 700 /etc/httpd.conf
Post by Vladimir N. Oleynik
Post by Hiroshi Ito
and, restart inetd
as kill SIGHUP
Oh, Busybox inetd supports it. good. thanks for information.


Luke, additional information is here.

From: "Luke Fimmerzane" <***@hotmail.com>
Subject: [BusyBox] busybox httpd
Date: Thu, 04 Nov 2004 01:03:09 +0000
Post by Vladimir N. Oleynik
(3) My httpd.conf file is as follows. I took it from source file. Is there
an example somewhere of what
this should look like? I've searched every entry in busybox mail list and
could not find any reference apart from see source file, which isn't very
useful.
Your httpd looks enabled CONFIG_FEATURE_HTTPD_AUTH_MD5 option.
So, your httpd.conf can write as follows.
A:127.0.0.1
A:10.7.10.0/25
D:*
/cgi-bin:foo:$1$$ymRz1g2wK23YTIgLEC9Pq1
/adm:admin:$1$$4A5x7prEOagU6.WOFB9DB1

MD5 passwd is generated by httpd, like this.
# httpd -m setup
$1$$4A5x7prEOagU6.WOFB9DB1
#

I also do not know, where is a document.
anyway, I understand it from source.
--------
Hiroshi Ito
Media Lab. Inc.,
URL http://www.mlb.co.jp ( Sorry, Japanese only. )
TEL +81-3-5294-7255 FAX +81-3-5294-7256
Hiroshi Ito
21 years ago
Permalink
From: "Vladimir N. Oleynik" <dzo at simtreas.ru>
Subject: Re: [BusyBox] busybox httpd
Date: Thu, 04 Nov 2004 08:05:19 +0300
Post by Vladimir N. Oleynik
Hiroshi,
Post by Hiroshi Ito
put a following line to /etc/inetd.conf,
www stream tcp nowait root /usr/sbin/httpd httpd -h /www
But more secure if make change "root" to "www.www"
(and make www user and group).
Yes, you are right.
and
chown www.www /etc/httpd.conf
chmod 700 /etc/httpd.conf
Post by Vladimir N. Oleynik
Post by Hiroshi Ito
and, restart inetd
as kill SIGHUP
Oh, Busybox inetd supports it. good. thanks for information.


Luke, additional information is here.

From: "Luke Fimmerzane" <lukefimmerzane at hotmail.com>
Subject: [BusyBox] busybox httpd
Date: Thu, 04 Nov 2004 01:03:09 +0000
Post by Vladimir N. Oleynik
(3) My httpd.conf file is as follows. I took it from source file. Is there
an example somewhere of what
this should look like? I've searched every entry in busybox mail list and
could not find any reference apart from see source file, which isn't very
useful.
Your httpd looks enabled CONFIG_FEATURE_HTTPD_AUTH_MD5 option.
So, your httpd.conf can write as follows.
A:127.0.0.1
A:10.7.10.0/25
D:*
/cgi-bin:foo:$1$$ymRz1g2wK23YTIgLEC9Pq1
/adm:admin:$1$$4A5x7prEOagU6.WOFB9DB1

MD5 passwd is generated by httpd, like this.
# httpd -m setup
$1$$4A5x7prEOagU6.WOFB9DB1
#

I also do not know, where is a document.
anyway, I understand it from source.
--------
Hiroshi Ito
Media Lab. Inc.,
URL http://www.mlb.co.jp ( Sorry, Japanese only. )
TEL +81-3-5294-7255 FAX +81-3-5294-7256

Vladimir N. Oleynik
21 years ago
Permalink
Hiroshi,
Post by Hiroshi Ito
put a following line to /etc/inetd.conf,
www stream tcp nowait root /usr/sbin/httpd httpd -h /www
But more secure if make change "root" to "www.www"
(and make www user and group).
Post by Hiroshi Ito
and, restart inetd
as kill SIGHUP


--w
vodz
Luke Fimmerzane
21 years ago
Permalink
Hi,
Can someone give me some pointers as to how I can get httpd working on my
Arm target. I am using BusyBox v1.00-rc3. I apologise if these 3 questions
are simple:

(1) httpd applet is built but it doesn't seem to support -p option. Is there
a config option I've missed.
e.g. when I do httpd --help I get

BusyBox v1.00-rc3 (2004.09.02-15:54+0000) multi-call binary

Usage: httpd [-c <conf file>] [-r <realm>] [-m pass] [-h home] [-d/-e
<string>]

Listens for incoming http server requests.

Options:
-c FILE Specifies configuration file. (default httpd.conf)
-r REALM Authentication Realm for Basic Authentication
-m PASS Crypt PASS with md5 algorithm
-h HOME Specifies http HOME directory (default ./)
-e STRING Html encode STRING
-d STRING URL decode STRING
(2) If I run it from command line it stops running e.g. if I do a ps aux
after running it,
this is what I get:


httpd &
~ # ps aux
PID Uid VmSize Stat Command
1 root 276 S init
2 root SW [keventd]
3 root SWN [ksoftirqd_CPU0]
4 root SW [kswapd]
5 root SW [bdflush]
6 root SW [kupdated]
8 root SW [mtdblockd]
9 root SW [rpciod]
17 root 528 S /sbin/inetd
77 root 644 S /sbin/cardmgr -d
95 root 356 S /bin/sh
169 root 240 T httpd
170 root 284 R ps aux
[1] + Stopped (tty input) httpd

(3) My httpd.conf file is as follows. I took it from source file. Is there
an example somewhere of what
this should look like? I've searched every entry in busybox mail list and
could not find any reference apart from see source file, which isn't very
useful.

more httpd.conf
A:127.0.0.1
A:10.7.10.0/25
D:*
/cgi-bin:foo:bar
/adm:admin:setup

Thanks for any help,
Luke

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo
Hiroshi Ito
21 years ago
Permalink
Hi,

From: "Luke Fimmerzane" <lukefimmerzane at hotmail.com>
Subject: [BusyBox] busybox httpd
Date: Thu, 04 Nov 2004 01:03:09 +0000
Post by Luke Fimmerzane
Hi,
Can someone give me some pointers as to how I can get httpd working on my
Arm target. I am using BusyBox v1.00-rc3. I apologise if these 3 questions
(1) httpd applet is built but it doesn't seem to support -p option. Is there
a config option I've missed.
follows are picked up from "make menuconfig"
Support using httpd only from inetd

CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY:
This option disables uid and port options for the httpd applet
but requires inetd server daemon.

This option disables -p.
Post by Luke Fimmerzane
(2) If I run it from command line it stops running e.g. if I do a ps aux
after running it,
Yes, and httpd reads request from stdin, and prints result to stdout.
/tmp # httpd
get / <= I typed in from kyboard.
HTTP/1.0 403 Forbidden
Content-type: text/html
Date: Thu, 04 Nov 2004 04:02:09 GMT
Connection: close

<HEAD><TITLE>403 Forbidden</TITLE></HEAD>
<BODY><H1>403 Forbidden</H1>

</BODY>
/tmp #
put a following line to /etc/inetd.conf,
www stream tcp nowait root /usr/sbin/httpd httpd -h /www

and, restart inetd
It will work.

--------
Hiroshi Ito
Media Lab. Inc.,
URL http://www.mlb.co.jp ( Sorry, Japanese only. )
TEL +81-3-5294-7255 FAX +81-3-5294-7256
Loading...