support for xinetd
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.
Updated by PeterLeese almost 15 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.
Updated by stbuehler over 14 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.
Updated by ewtoombs over 10 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.
Updated by gstrauss over 6 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:
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).
Also available in: Atom