Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: Greg Erskine on April 28, 2014, 07:48:00 PM
-
Hi,
Does anyone have the extension Busybox-httpd.tcz for piCore?
I have read through other threads concerning light weight http servers used for configuration purposes.
I have been experimenting with OliWeb but I am concerned because it is not popular it will soon stop development.
I couldn't compile Web Monkey or HTTPD myself as I now realise I don't have anywhere enough experience to fix compiling problems as they occur.
Mongoose doesn't include CGI in the free version.
The fact that HTTPD is a simple, small HTTP server that a standard module of Busybox makes it ideal, I think.
If there are detailed instructions for compiling just the HTTPD module from Busybox that would be even better. ;D
regards
Greg
-
Hi Greg Erskine
Have read this thread:
http://forum.tinycorelinux.net/index.php/topic,16226.msg96194.html#msg96194
-
Hi Rich,
I believe I have read through all the threads relating to this topic. I did a forum search and a web search. I have spent a few days working on this before asking.
The only Busybox-httpd.tcz I can find is for core not piCore.
Mongoose charges $5 a year for their CGI version. I need basic CGI and I like open solutions.
I am currently using OliWeb but I prefer a generic solution.
I have tried compiling a few for myself but hit a lack-of-knowledge brickwall.
regards
-
Hi Greg Erskine
From the link I posted:
Mongoose supports CGI too
And it's already in the repository.
-
You can use apache2 to use CGI. You need to modify the httpd.conf where to find the cgi-bin folder.
You need also to add /usr/local/etc/httpd/httpd.conf to .filetool to save the configuration after reboot.
You must create an extension with your CGI files or to use backup to save CGI file. Personally I create an extension with CGI files.
-
Mongoose charges $5 a year for their CGI version. I need basic CGI and I like open solutions.
Mongoose is GPL v2 licensed, see https://code.google.com/p/mongoose/ Source code is available. Never seen any charge or fee related to Mongoose. Where did you read it?
-
To compile BusyBox httpd is easy. Just edit .config and type make, make install and pack it. Of cource you need the GCC dev environment.
-
busybox-httpd.tcz added to repo
-
Hi Greg Erskine
From the link I posted:
Mongoose supports CGI too
And it's already in the repository.
Thanks Rich
You can use apache2 to use CGI. You need to modify the httpd.conf where to find the cgi-bin folder.
You need also to add /usr/local/etc/httpd/httpd.conf to .filetool to save the configuration after reboot.
You must create an extension with your CGI files or to use backup to save CGI file. Personally I create an extension with CGI files.
Thanks imaad
Mongoose charges $5 a year for their CGI version. I need basic CGI and I like open solutions.
Mongoose is GPL v2 licensed, see https://code.google.com/p/mongoose/ Source code is available. Never seen any charge or fee related to Mongoose. Where did you read it?
Hi bmarkus,
http://cesanta.com/mongoose.shtml
I went to this download page before I found the source code. On a closer look the license scheme for the binaries is different from the source code.
To compile BusyBox httpd is easy. Just edit .config and type make, make install and pack it. Of cource you need the GCC dev environment.
I just sat down to try this when I refreshed the page and saw your next post. ;D
busybox-httpd.tcz added to repo
Thanks bmarkus. :D I will try it today and report back.
-
Mongoose charges $5 a year for their CGI version. I need basic CGI and I like open solutions.
Mongoose is GPL v2 licensed, see https://code.google.com/p/mongoose/ Source code is available. Never seen any charge or fee related to Mongoose. Where did you read it?
Hi bmarkus,
http://cesanta.com/mongoose.shtml
I went to this download page before I found the source code. On a closer look the license scheme for the binaries is different from the source code.
More precisely:
Mongoose is licensed under the terms of GNU GPL v.2 license.
Businesses have an option to get a non-restrictive, royalty-free license and professional support from Cesanta Software.
-
Thanks again bmarkus,
I have been testing busybox-httpd over the last few days and it seems to be working fine. I have changed most of piCorePlayer webUI from OliWeb to httpd. There is a major difference in the way they handle the $QUERY_STRING.
I did notice that the executable has changed its' name from "busybox-httpd" to just "httpd" at some time. Thanks for that. I prefer just httpd as it lines up with the "Into the Core" manual and other distributions. I would have asked you to do that but didn't want to push the friendship being a newbie.
One quirk I did notice with httpd, is it strips off the html code before the <head> tag (might be a CGI issue). This is not a problem for the purpose I am using it for but it does mean that the html code will not successfully validate using W3C Markup Validation Service.
I can see piCore becoming a significant Linux distribution for the Raspberry Pi.
regards
-
Progress report...
Busybox httpd working great for my purposes.
Here's a simple startup script.
Note: Avoid using PID files.
#!/bin/sh
NAME="httpd"
DESC="Web server"
DAEMON=/usr/local/sbin/httpd
OPTIONS="-h /home/tc/www"
case "$1" in
start)
echo "Starting $DESC: $NAME..."
start-stop-daemon --start --quiet -b --exec $DAEMON -- $OPTIONS
;;
stop)
echo "Stopping $DESC: $NAME..."
start-stop-daemon --stop --quiet --exec $DAEMON
;;
restart)
echo "Restarting $DESC..."
start-stop-daemon --stop --quiet --exec $DAEMON
sleep 3
start-stop-daemon --start --quiet -b --exec $DAEMON -- $OPTIONS
;;
force)
echo "Trying to force a restart of $NAME..."
ps -ef | grep httpd | grep -v grep | awk '{ print $1 }' | xargs kill -9
sleep 5
start-stop-daemon --start --quiet -b --exec $DAEMON -- $OPTIONS
;;
status)
ps -ef | grep $DAEMON | grep -v grep | awk '{ print $0 }'
;;
*)
echo ""
echo -e "Usage: /usr/local/etc/init.d/`basename $0` [start|stop|restart|force|status]"
echo ""
exit 1
;;
esac
exit 0