I want to launch
lighttpd
when someone tries to connect to port 80.
I started with a simple test script to see if anything was working:
/etc/xinetd.d/www
service www
{
disable = no
socket_type = stream
protocol = tcp
port = 80
log_on_success += USERID
log_on_failure += USERID
server = /usr/server_test.sh
user = root
instances = UNLIMITED
wait = no
log_type = SYSLOG daemon debug
}
where /usr/server_test.sh
:
#!/bin/sh
echo "www connection"
lighttpd -D -f /usr/lighttpd.conf &
webconfig -c /usr/cppcms.js &
service xinetd restart
When I try:
nc localhost 80
I get:
www connection 2013-11-25 16:37:13: (network.c.345) can't bind to port: 80 Address already in use
How do I get xinetd
and lighttpd
to work together, not fight over same port?
Asked by JakobJ
(157 rep)
Nov 29, 2013, 10:46 AM
Last activity: Feb 22, 2018, 12:10 PM
Last activity: Feb 22, 2018, 12:10 PM