# lighttpd fails to start on Jail.



## mzs47 (Mar 6, 2016)

Before www/apache24 was running on this jail. Removed it and restarted the jail after installing www/lighttpd


```
root@http52:~ # service lighttpd start
Starting lighttpd.
2016-03-06 07:24:16: (network.c.250) socket failed: Protocol not supported
/usr/local/etc/rc.d/lighttpd: WARNING: failed to start lighttpd
```

Snippets from the configuration /usr/local/etc/lighttpd/lighttpd.conf:


```
server.bind = "192.168.56.52"

var.home_dir  = "/var/spool/lighttpd
var.socket_dir  = home_dir + "/sockets"

# IPv4 listening socket
$SERVER["socket"] == "192.168.56.52:80" { }
```

I created the sockets directory manually:


```
mkdir -p /var/spool/lighttpd/sockets/
chown www:www /var/spool/lighttpd/sockets/
```

What could be going wrong?


----------



## Juha Nurmela (Mar 6, 2016)

It's trying to create an INET6 socket. There must be knob you can turn to just-use-4 ?

And I thought just-use-8 was smelling badly 
Juha


----------



## mzs47 (Mar 7, 2016)

Thanks!

I had to set that to disable.


```
server.use-ipv6 = "disable"
```

But I thought Jails had support for IPv6, so because there was no IPv6 address assigned to jail it failed to start?


----------



## Juha Nurmela (Mar 8, 2016)

I don't know jails or INET6 at all, but there is a typo in your *var.home_dir*. Just cut&paste error, I guess.

Juha


----------



## SirDice (Mar 8, 2016)

mzs47 said:


> But I thought Jails had support for IPv6, so because there was no IPv6 address assigned to jail it failed to start?


Jails have support for IPv6 but do need to have an IPv6 addresses assigned to it. A 'regular" host will always be able to bind to ::1 if no external addresses are defined. A jail however doesn't have a lo0 and therefor there's no ::1 (or 127.0.0.1) to bind to.


----------

