Project

General

Profile

inetd + lighttpd

Added by vlrk about 2 months ago

Hi team,

I am trying to run lighttpd using inetd.conf.

My lighttpd version is 1.4.66

I run ligttpd in one of custom linux flavour with kernel version on arm 64 board.

I am using below entry in the inetd.conf

80www stream tcp6 nowait 1006 lighttpd -f /var/etc/lighttpd.conf -1

my lighttpd.conf is like below ( only mentioning relevant config below)

server.use-ipv6 = "enable" 
server.port = 80
$SERVER["socket"] == "0.0.0.0:80" { }

from strace of inetd I see like bind with sa_family as INET6
bind(8, {sa_family=AF_INET6, sin6_port=htons(23), sin6_flowinfo=htonl(1209008384), inet_pton(AF_INET6, "::", &sin6_addr), sin6_scope_id=69704}, 28) = 0
also when any connection comes below is the trace I see
accept(6, {sa_family=AF_INET6, sin6_port=htons(42148), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:192.168.1.1", &sin6_addr), sin6_scope_id=0}, [28]) = 9
Because of this reason, it seems never work for IPv4 on 80 port.

In case if I keep ipv4 and ipv6 as different configs as below ,

ipv4 sake:
server.port = 80

ipv6 sake:
server.use-ipv6 = "enable"
$SERVER["socket"] == "[::]:80" { }

inetd.conf :
80http stream tcp nowait 1006 /sbin/muhttpd -c /var/etc/lighttpd.conf -1
80http stream tcp6 nowait 1006 /sbin/muhttpd -c /var/etc/lighttpd.conf -1

and try to start inetd , I get error like below.

Unable to bind server socket to port 80: Address already in use

Please guide on this , if any thing to be corrected .

Best Regards
vlrk


Replies (3)

RE: inetd + lighttpd - Added by gstrauss about 2 months ago

As with a number of your other posts on this site, you seem not to know the basics of troubleshooting.

Refer to the documentation early and often.
Start with the simplest lighttpd.conf possible. Test that it works.
Make a single change or addition to the config. Test that it works. Repeat.

RE: inetd + lighttpd - Added by vlrk about 2 months ago

@gstrauss: I got the essence of your reply as "to trouble shoot more" thanks. I will do so.

Request to others , in case if already seen this or any other constructive inputs will be highly useful.

Regards
vlrk

RE: inetd + lighttpd - Added by gstrauss about 2 months ago

I got the essence of your reply as "to trouble shoot more" thanks. I will do so.

Not quite.

Troubleshoot methodically

in case if already seen this or any other constructive inputs will be highly useful.

Unable to bind server socket to port 80: Address already in use

It does not appear that your troubleshooting has included using a search engine.

    (1-3/3)