0

I've had a machine running Ubuntu 9.10, with lighttpd and PHP. After the OS update to Ubuntu 10.04, it installed apache2 automatically for some reason (I believe it is due to some dependencies php -> apache). Anyway I removed apache2 permanently, but starting lighttpd fails, giving provided error -

can't bind to port: :: 80 Address already in use

using

sudo lsof -i :80

results in empty list!!

What is wrong?!

thanks in advance, m.

  • Could you post result of netstat -lpn? – mkudlacek Jul 19 '10 at 12:21
  • here it goes ... pastebin.com/EH3BwQcP – migajek Jul 19 '10 at 12:40
  • Please show the output of netstat -tulpen – ddeimeke Jul 19 '10 at 12:51
  • Are you sure the result is everything from netstat -lpn ? Because it shows only sockets. Did you run it as root? The result should look like this: pastebin.com/raw.php?i=M8ZuqTrX – mkudlacek Jul 19 '10 at 12:54
  • indeed, my mistake. I thought it was just result of some commands I tried before. there you go : pastebin.com/raw.php?i=xKjfLqAt however I don't see anything on 80 :( – migajek Jul 19 '10 at 13:05
2

Are you running lighttpd as root (sudo)? Normal users can't launch processes that bind on ports < 1024 ...

  • I am running as root :) 'sudo service lighttpd start' ;) – migajek Jul 19 '10 at 18:47
  • @migajek the "::" make me think of IPv6... have you tried disabling IPv6 support in lighttpd.conf ? – Mr Shunz Jul 20 '10 at 11:09
1

I ended up with replacing the config file with the default one, than copying custom settings back to the new config. I haven't compared the files, however the only change after all the modifications is the order of extension (modules) loading, I think.

1

Just in case this was overlooked or not showing up for some reason, but skype uses port 80, so make sure it isn't running when you start your server....

1

I solved this by commenting out below line and the IPv6 Virtual Host in /etc/lighttpd.conf file.

#include_shell "/usr/share/lighttpd/use-ipv6.pl" 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.