You are not logged in.

#1 2004-09-28 21:47:14

Cotton
Member
From: Cornwall, UK
Registered: 2004-09-17
Posts: 568

Request: thttpd

Any chance someone could create a package for the Tiny http server, thttpd, available from:

http://www.acme.com/software/thttpd/

Thanks.

Offline

#2 2004-09-28 22:04:46

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: Request: thttpd

I also would like to see that package. 8)

Offline

#3 2004-09-28 22:56:31

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Request: thttpd

what about a really big one? roxen: http://www.roxen.com/products/webserver/

(i experimented with it on a older SuSE installation - it is really huge)

no, seriously: thttpd is really usefull --- maybe i have some time this weekend ;-)


The impossible missions are the only ones which succeed.

Offline

#4 2004-10-17 10:13:45

Cotton
Member
From: Cornwall, UK
Registered: 2004-09-17
Posts: 568

Re: Request: thttpd

Anyone?

Offline

#5 2004-10-21 12:33:44

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: Request: thttpd

:cry:

Offline

#6 2004-10-21 13:40:07

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Request: thttpd

i cannot watch people being sad ... here:

# $Id: $
# Maintainter: Damir Perisa <damir.perisa@bluewin.ch>

pkgname=thttpd
pkgver=2.25b
pkgrel=1
pkgdesc="tiny/turbo/throttling HTTP server"
url="http://www.acme.com/software/thttpd/"
source=($url/$pkgname-$pkgver.tar.gz)

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  mkdir -p $startdir/pkg/usr/man/man1/
  make prefix=$startdir/pkg/usr WEBGROUP=root install || return 1
  # install -D -m755 ../thttpd $startdir/pkg/etc/rc.d/thttpd
}

only thing:
/etc/rc.d/thttpd do not yet exist ... anyone to write one?


The impossible missions are the only ones which succeed.

Offline

#7 2004-10-21 14:33:09

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Request: thttpd

bah not tested... I wrote this out in the forums and not on my linux box, so if it fails, then screw with it... i'll just provide a skeleton

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
    start)
      stat_busy "Starting thttpd"
      /usr/local/sbin/thttpd -D -C /usr/local/www/thttpd_config
      if [ $? -gt 0 ]; then
          stat_fail
      else
          add_daemon thttpd
          stat_done
      fi
      ;;
    stop)
      stat_busy "Stopping thttpd"
      killall thttpd
      if [ $? -gt 0 ]; then
          stat_fail
      else
          rm_daemon thttpd
          stat_done
      fi
      ;;
    restart)
      $0 stop
      sleep 1
      $0 start
      ;;
    *)
      echo "Usage $0 {start|stop|restart}"
      ;;
esac

and the config file: /usr/local/www/thttpd_config

dir=/usr/local/www/data
chroot
cgipat=**.cgi
logfile=/usr/local/www/logs/thttpd_log
pidfile=/var/run/thttpd.pid

Offline

#8 2004-10-21 22:25:46

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Request: thttpd

phrakture wrote:

bah not tested... I wrote this out in the forums and not on my linux box, so if it fails, then screw with it... i'll just provide a skeleton

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
    start)
      stat_busy "Starting thttpd"
      /usr/local/sbin/thttpd -D -C /usr/local/www/thttpd_config
      if [ $? -gt 0 ]; then
          stat_fail
      else
          add_daemon thttpd
          stat_done
      fi
      ;;
    stop)
      stat_busy "Stopping thttpd"
      killall thttpd
      if [ $? -gt 0 ]; then
          stat_fail
      else
          rm_daemon thttpd
          stat_done
      fi
      ;;
    restart)
      $0 stop
      sleep 1
      $0 start
      ;;
    *)
      echo "Usage $0 {start|stop|restart}"
      ;;
esac

and the config file: /usr/local/www/thttpd_config

dir=/usr/local/www/data
chroot
cgipat=**.cgi
logfile=/usr/local/www/logs/thttpd_log
pidfile=/var/run/thttpd.pid

replace /usr/local/ by /usr/ and these should be ok
thanx

PS
"bah" is overrated ;-)


The impossible missions are the only ones which succeed.

Offline

#9 2004-10-21 22:34:15

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Request: thttpd

thttpd-2.25b-1 -> testing

give it a try and report your success/failure with it


The impossible missions are the only ones which succeed.

Offline

#10 2004-10-22 14:44:35

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: Request: thttpd

dp & phrakture, first of all thanks smile

Now I grabbed the package from testing and installed it.

it didn't work and it complained on starting thttpd

mkdir /usr/www/logs
mkdir /usr/www/data

fixed it a bit. but now I get this:

$ sudo /etc/rc.d/thttpd start
:: Starting thttpd                                                       [BUSY] /usr/sbin/thttpd: logfile is not within the chroot tree, you will not be able to re-open it

Offline

#11 2004-10-22 15:05:40

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Request: thttpd

you copied the config file to the right path?

Offline

#12 2004-10-23 09:14:32

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: Request: thttpd

grabbed the package from testing

$ pacman -Ql thttpd
thttpd /etc/
thttpd /etc/rc.d/
thttpd /etc/rc.d/thttpd
thttpd /usr/
thttpd /usr/man/
thttpd /usr/man/man1/
thttpd /usr/man/man1/htpasswd.1.gz
thttpd /usr/man/man1/makeweb.1.gz
thttpd /usr/man/man8/
thttpd /usr/man/man8/redirect.8.gz
thttpd /usr/man/man8/ssi.8.gz
thttpd /usr/man/man8/syslogtocern.8.gz
thttpd /usr/man/man8/thttpd.8.gz
thttpd /usr/sbin/
thttpd /usr/sbin/htpasswd
thttpd /usr/sbin/makeweb
thttpd /usr/sbin/syslogtocern
thttpd /usr/sbin/thttpd
thttpd /usr/www/
thttpd /usr/www/cgi-bin/
thttpd /usr/www/cgi-bin/phf
thttpd /usr/www/cgi-bin/redirect
thttpd /usr/www/cgi-bin/ssi
thttpd /usr/www/thttpd_config

also made those 2 dirs or else it could complain
but now it also complains smile
I must be missing sth, and I will not be the only one, so it would be wise to put an echo in the package on what to do next, if we're supposed to do something more

thanks again

Offline

#13 2004-10-23 10:30:11

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Request: thttpd

thttpd-2.25b-1t2 is out:

changes:

- added missing dir /usr/www/data
- changed logs to be under /var/log/thttpd/

by the way:

  thttpd: /usr/man/man1/htpasswd.1.gz: owned by apache
  thttpd: /usr/sbin/htpasswd: owned by apache

it seems that apache conflicts with thttpd in this files --- diff says that they are not the identical --- anybody knows more about the difference of them?


The impossible missions are the only ones which succeed.

Offline

#14 2004-10-23 14:13:39

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: Request: thttpd

still the same here..

$ sudo /etc/rc.d/thttpd start
:: Starting thttpd                                                       [BUSY] /usr/sbin/thttpd: logfile is not within the chroot tree, you will not be able to re-open it

Offline

#15 2004-10-23 14:50:23

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Request: thttpd

zeppelin wrote:

still the same here..

$ sudo /etc/rc.d/thttpd start
:: Starting thttpd                                                       [BUSY] /usr/sbin/thttpd: logfile is not within the chroot tree, you will not be able to re-open it

i was not thinking while making 1t2 .... argh!

thttpd wants the log to be in the chroot? ok, let's do exactly that:
logfile=/usr/www/data/log/thttpd_log

1t3 is out and let's hope i was more concentrated this time  :oops:  wink


The impossible missions are the only ones which succeed.

Offline

#16 2004-10-23 19:00:27

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: Request: thttpd

well

$ sudo /etc/rc.d/thttpd start
:: Starting thttpd                                                       [BUSY]

nothing else happens [i have to kill it]

d_tidptr=0xb7e9a4a8) = 15009
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x80789f0, [], 0}, {SIG_DFL}, 8) = 0
waitpid(-1,

so I'm guessing sth with the 'return' value that won't make it pass thru and it sticks to Busy because other than that it seems to work fine

Offline

#17 2004-10-23 21:53:56

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Request: thttpd

zeppelin wrote:

well

$ sudo /etc/rc.d/thttpd start
:: Starting thttpd                                                       [BUSY]

nothing else happens [i have to kill it]

d_tidptr=0xb7e9a4a8) = 15009
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x80789f0, [], 0}, {SIG_DFL}, 8) = 0
waitpid(-1,

so I'm guessing sth with the 'return' value that won't make it pass thru and it sticks to Busy because other than that it seems to work fine

just wondering: do you have some files under /usr/www/data? else, the server has nothing to offer, if i understand it right

thttpd comes really "tiny" and has no default dummy html file for the start


The impossible missions are the only ones which succeed.

Offline

#18 2004-10-24 08:47:24

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: Request: thttpd

again the server works but it will freeze saying BUSY. try it yourself and you'll see.

$ pwd
/usr/www/data
[nk@Freud data]$ ls
foo  foo.html  log
$ su
Password:
[root@Freud data]# /etc/rc.d/thttpd start
:: Starting thttpd                                                       [BUSY]

Offline

#19 2004-10-24 11:19:16

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Request: thttpd

zeppelin wrote:

again the server works but it will freeze saying BUSY. try it yourself and you'll see.

$ pwd
/usr/www/data
[nk@Freud data]$ ls
foo  foo.html  log
$ su
Password:
[root@Freud data]# /etc/rc.d/thttpd start
:: Starting thttpd                                                       [BUSY]

the server works for you, but simply the /etc/rc.d/thttpd keeps being [busy]? sorry, that i didn't understand this the first time

i tried to run thttpd by hand and not from the rc.d script, sorry - i trusted that phrakture made it right

ok: 1t5 is out and i removed "-D" that hinders thttpd to become daemon ... see more info here:
http://www.acme.com/software/thttpd/thttpd_man.html


The impossible missions are the only ones which succeed.

Offline

#20 2004-10-24 15:55:39

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: Request: thttpd

well by removing -D we have these problems:

sudo /etc/rc.d/thttpd start
:: Starting thttpd                                                       [DONE]
[nk@Freud ~]$ sudo /etc/rc.d/thttpd restart
:: Stopping thttpd                                                       [BUSY] Terminated


-D works fine, but

if [ $? -gt 0 ]; then
          stat_fail
      else
          add_daemon thttpd
          stat_done

don't seem to be the correct, cause eventhough the app seems to run ok, it keeps saying busy

Offline

#21 2004-10-24 16:51:18

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Request: thttpd

sorry about that - like i said i didnt test it...

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions
PID=`pidof -o %PPID /usr/local/sbin/thttpd`
case "$1" in
    start)
      stat_busy "Starting thttpd"
      /usr/local/sbin/thttpd -C /usr/local/www/thttpd_config
      if [ $? -gt 0 ]; then
          stat_fail
      else
          add_daemon thttpd
          stat_done
      fi
      ;;
    stop)
      stat_busy "Stopping thttpd"
      [ ! -z "$PID" ] && kill $PID &>/dev/null
      if [ $? -gt 0 ]; then
          stat_fail
      else
          rm_daemon thttpd
          stat_done
      fi
      ;;
    restart)
      $0 stop
      sleep 1
      $0 start
      ;;
    *)
      echo "Usage $0 {start|stop|restart}"
      ;;
esac

and the config file: /usr/local/www/thttpd_config

dir=/usr/local/www/data
chroot
cgipat=**.cgi
logfile=/usr/local/www/logs/thttpd_log
pidfile=/var/run/thttpd.pid

[/quote]

Offline

#22 2004-10-29 10:08:39

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: Request: thttpd

it now works.
dp plz update the pkg, of course remove the /local stuff

Offline

#23 2004-10-29 10:54:53

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Request: thttpd

very sorry, i totally forgot this thread  :oops:  (evolutive genetics is soooo cool!!!)


i'll update it asap - thanx for reminder


The impossible missions are the only ones which succeed.

Offline

Board footer

Powered by FluxBB