How is CGI implemented in the standard HTTPD??

Support section for FREESCO v0.4.x

How is CGI implemented in the standard HTTPD??

Postby bob selby » Mon Oct 25, 2010 12:42 pm

Is it built into "thttpd" ??

What is the diff between "thttpd" and "thttpd_c" ??

I need to implement some sort of web server that can ofer CGI on an embedded platform and I'm wondering about the best approach.

Bob
bob selby
Advanced Member
 
Posts: 292
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: How is CGI implemented in the standard HTTPD??

Postby dingetje » Tue Oct 26, 2010 2:05 pm

Is it built into "thttpd" ??

Yes, as you may know the web control panel in FREESCO is hosted by thttpd and relies massively on CGI

What is the diff between "thttpd" and "thttpd_c" ??

I don't know, where did you find thttpd_c? Any links?

I need to implement some sort of web server that can ofer CGI on an embedded platform and I'm wondering about the best approach.


Can you provide a bit more information about that embedded platform?
GreetZ
http://dingetje.homeip.net

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1004
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands

Re: How is CGI implemented in the standard HTTPD??

Postby bob selby » Tue Oct 26, 2010 3:11 pm

Thanks,

thttpd and thttpd_c are both in "sbin" ;-)

3104 S 1 thttpd thttpd-d/www-p80-unobody
3144 S 1 thttpd_c thttpd_c-d/wwa-p82-uroot

The embedded platform is "thread-x" based running on an ARM9 processor - ie not linux.

Just trying to figure out if I should try to add CGI to our existing web server, or try to port a new webserver ... but either way we would need a compact solution.

Bob
bob selby
Advanced Member
 
Posts: 292
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: How is CGI implemented in the standard HTTPD??

Postby Lightning » Tue Oct 26, 2010 7:12 pm

In the 04x series of FREESCO thttpd and thttpd_c are exactly the same binary and thttpd_c is just a symbolic link to thttpd. The reason they were separated into two different names was so that the web server could be restarted from within the control panel because thttpd_c runs the control panel and thttpd runs the web server. In previous versions of FREESCO both the web server and the control panel were stopped and started by the same rc_httpd script because it was just one binary name. Now there is rc_httpd and rc_control to control them separately.

As for running CGI, it is completely possible to run CGI scripting. The only issue becomes what is the shell that needs to run the shell scripting. In some cases the built in ash "sh" script is enough. But in other instances it may require the addition of the full bash "sh" binary or you may even need perl or some other sort of shell binary to run the CGI scripting. A quick look at the CGI script should let us/you know what will be required to some degree.

With regards to web serving thttpd is quite an efficient web server and actually has much better performance than Apache as long as it is just web pages and CGI scripting. If you need to include anything that requires PHP then Apache is a much better choice.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3045
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: How is CGI implemented in the standard HTTPD??

Postby bob selby » Wed Oct 27, 2010 2:00 am

Many thanks for that :-)
Bob
bob selby
Advanced Member
 
Posts: 292
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: How is CGI implemented in the standard HTTPD??

Postby strampke » Sun Jun 19, 2011 2:27 pm

What version is thttpd in Freesco 0.4.x?
Who knows knows, who doesn't doesn't.
User avatar
strampke
Junior Advanced Member
 
Posts: 150
Joined: Mon Jul 29, 2002 12:36 pm
Location: Delden, Netherlands

Re: How is CGI implemented in the standard HTTPD??

Postby Lightning » Mon Jun 20, 2011 8:42 am

What version is thttpd in Freesco 0.4.x?
Version 2.25b
However as with most programs in FREESCO it has been modified a fair amount.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3045
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA


Return to FREESCO Support for v0.4.x

Who is online

Users browsing this forum: No registered users and 1 guest

cron