Javacat posted on May 3 2006 at 08:19 AM said:
I have had a quick look at some files from firmware update and there isn't an actual configuration file for it. I've opened thttpd in a hex editor and the folder appears to be set manually. It does appear as though you can specify a configuration file when thttpd is launched through a switch. The available switches are:
[-C configfile] [-p port] [-d dir] [-r|-nor] [-v|-nov] [-g|-nog] [-u user] [-c cgipat] [-t throttles] [-h host] [-l logfile] [-i pidfile] [-T charset] [-V] [-D]
When the GP2X launches it, it appears to only pass the -r switch. You should be able to change this by editing the inet file located in etc\init.d.
I haven't actually gotten around to installing this firmware and as such all of the above is complete guesswork (with a little bit of logic :unsure
, so I may be completely off the mark.
Edit: this may be of some use -
http://www.acme.com/software/thttpd/thttpd_man.html
Binary file editors are amazing things
I used mine to look at a copy of gp2xmenu and searched for 'thttpd'.
There are two occurrences of this string. The first appears to be used
to start thttpd and the second to kill it.
Unfortunately, the first hard coded strings does not have enough
null characters following it to permit patching with '-C configfilename'
so it appears not possible in Firmware version 2.0.0 to change
the webserver configuration as used by gp2xmenu.
Now, if gp2xmenu can run and kill thttpd, so can another process.
It appears that /etc/rc.d/rc.sysinit is the shell script used to start
gp2xmenu during bootup. If this file is editted to check for and
kill the image started by gp2xmenu then it could start a new
process with appropriate command line parameters. I don't know
how quickly gp2xmenu starts thttpd and when it would appear in
the process list. Some form of delay might be needed in rc.sysinit
to allow for this.
I'm not much of a Linux programmer, so is there anyone else who
would like to take this on?