Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: paco on January 20, 2014, 12:49:57 PM
-
Hi all,
I wanted to install a webserver with IPv6 support. I tried pythons SimpleHTTPServer and mongoose, but both listen on 0.0.0.0:80 only.
Does anyone has an idea for a workaround (proxying, port forwarding, ...) or did I miss another webserver currently available as tcz?
Cheers,
Patrick
-
Which piCore version?
-
It's piCore 5.1 rc4.
Cheers,
Patrick
-
Install the ipv6....tcz package from the repo
-
I did. IPv6 works fine, but mongoose seems not to be compiled with IPv6 support.
tc@box:~$ netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 fe80::ba27:ebff:febd:----:22 fe80::201:2eff:fe2b:----:37797 ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] SEQPACKET LISTENING 1114 /run/udev/control
unix 3 [ ] DGRAM 1124
unix 3 [ ] DGRAM 1123
I tried manually with an IPv6 Socket, but mongoose does not reckon it.
-
I do not remember wether IPV6 was enabled or not.
-
IPv6 seems to be disabled for mongoose. Temporarily I installed a reverse proxy listening on port 80 redirecting to mongoose on port 8080.
For the reverse proxy I use nodejs with http-proxy (minor patch to enable ipv6 support) and:
var http = require('http'),
httpProxy = require('http-proxy');
httpProxy.createProxyServer({target:'http://127.0.0.1:8080'}).listen(80, '::');
-
I will enable in next update when I get time, thanks for reporting, thanks for reporting missing ipv6
-
Mongoose updated and ipv6 enabled. Please try ipv6, I had no time to test.
-
Hi Markus,
IPv6 works fine, but when I use IPv4 only, mongoose won't start like before, even with explicitely declared interface:
tc@box:~$ sudo mongoose -listening_ports 80
set_ports_option: cannot bind to 80: Address family not supported by protocol
Failed to start Mongoose.
tc@box:~$ sudo mongoose -listening_ports 0.0.0.0:80
set_ports_option: cannot bind to 0.0.0.0:80: Address family not supported by protocol
Failed to start Mongoose.
tc@box:~$ sudo mongoose -listening_ports 192.168.0.111:80
set_ports_option: cannot bind to 192.168.0.111:80: Address family not supported by protocol
Failed to start Mongoose.
tc@box:~$ tce-load -i /mnt/mmcblk0p2/tce/optional/ipv6-3.12.1-piCore\+.tcz
/mnt/mmcblk0p2/tce/optional/ipv6-3.12.1-piCore+.tcz: OK
tc@box:~$ sudo modprobe ipv6
tc@box:~$ sudo mongoose -listening_ports 80
Mongoose web server v. 3.8 started on port(s) 80 with web root [.]
What do you think about two packages, monoogse and mongoose_ipv6?
Cheers,
Patrick
-
Hm... It need some investigation wether is it possible to have both in one version. If you have some time, can you check theit mailing list, forum or contact author?
Do you need dropbear or another WEB server would be OK? I have Apache 2.4.7 running, just need to polish startup scripts, etc. But I can send you as it is now for testing.
-
There is no urgent need for another web server. The workaround using a reverse proxy works fine.
I will check mongoose project page and issue list if I can find some details about IPv4/IPv6 stuff.
-
There is an issue on the project page:
"Poor behavior on kernel without IPv6 support when compiled with USE_IPV6"
https://code.google.com/p/mongoose/issues/detail?id=393
... but no fix, yet.
-
DO you advice to have two mongoose packagese, one for ipv4 and one for ipv6?
-
Yes - two packages would be nice.
Furthermore I will track the bug and report if a solution was found.
-
You can try Apache, see apache2.4.tcz in the repo. Not so heavy as one would expect :)
-
Hi Markus,
just changed to apache - works perfectly :). Thanks a lot.
Cheers,
Patrick