Project

General

Profile

Actions

Feature #1584

closed

support for xinetd

Added by PeterLeese over 16 years ago. Updated over 8 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

Any change of adding support to allow lighttpd to be started from xinted?
Perhaps a command line option that then makes lighttpd take stdin fd as the socket to listen on.

Actions #1

Updated by admin over 16 years ago

When would you use this?

Actions #2

Updated by PeterLeese over 16 years ago

On a resource limited machine were I like to run only xinetd and only start any other servers when required (which is very infrequent)

OK, I do understand that lighttpd is already very light i.e. is excellent it that respect. I just like the idea of using xinetd to start services on demand as opposed to have lots of rarely used daemons running all the time from boot. I do understand if you decide that this request is not worth the effort; but hey its worth a try.

I'm willing to have a go at creating a patch and submitting if you wish.

Actions #3

Updated by Anonymous over 16 years ago

Would like to run ligthtpd via inetd, too.

-- Joerg

Actions #4

Updated by Anonymous over 16 years ago

I tried to search for any web-server with cgi-support running via xinetd and really can't find anything. There are many use cases it is really usefull. Please add this feature to lighttpd

Actions #5

Updated by Anonymous over 16 years ago

yes this would be very usefull for me!

-- x0rcist

Actions #6

Updated by stbuehler over 16 years ago

  • Status changed from New to Fixed
  • Resolution set to wontfix

Perhaps someone will implement this someday. But i don't think so.

And btw: iirc, you have just to communicate over the stdin fd, not to listen/accept on it; there is no server socket.

Actions #7

Updated by stbuehler about 16 years ago

  • Status changed from Fixed to Wontfix
Actions #8

Updated by ewtoombs about 12 years ago

This is a really good idea for lightweight servers, especially embedded ones like routers. It is also nice for people like me who are only using lighttpd to serve some files in a directory, who don't need responsiveness, and who would prefer not to keep so many small daemons like ssh, samba, and lighttpd in memory all the time. All I'm saying is there are plenty of people who would like to run this http daemon with xinetd.

Actions #9

Updated by gstrauss over 8 years ago

  • Description updated (diff)
  • Status changed from Wontfix to Patch Pending
  • Target version changed from 1.5.0 to 1.4.40

I submitted a patch to add lighttpd -1 (one-shot) mode of operation for use with xinetd:
https://github.com/lighttpd/lighttpd1.4/pull/43

From the commit message:
Note: lighttpd is designed as a high performance, long-running server,
not a one-shot executable. This one-shot mode of operation has not been
tuned for performance. lighttpd server start-up and initialization aims
for correctness, not speed. If using this one-shot mode as part of fork
and exec from xinetd, then performance is already not of high concern.

Aside: sorry, this patch does not quite work with netcat. xinetd provides the connected socket on stdin, whereas netcat uses pipes to stdin and stdout. The current lighttpd architecture expects the client connection to be a socket. Changing that would require changing code on the critical path to serving existing connections, all of which are sockets. Therefore, this has not been done, though I am willing to discuss it if someone has a use case where they think lighttpd just must be used with netcat (instead of some other simpler mechanism or web daemon).

Actions #10

Updated by gstrauss over 8 years ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100
Actions

Also available in: Atom