Skip to main content

I want to launch lighttpdlighttpd 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/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"/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 xinetdxinetd and lighttpdlighttpd to work together, not fight over same port?

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?

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?

added 1 characters in body
Source Link
schaiba
  • 7.8k
  • 1
  • 35
  • 32

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/xintdxinetd.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?

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/xintd.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?

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?

Source Link
JakobJ
  • 157
  • 1
  • 6

xinetd cannot launch lighttpd

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/xintd.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?