Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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
show 6 more comments

4 Answers

up vote 2 down vote accepted

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

share|improve this answer
    
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
add comment

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" 
share|improve this answer
add comment

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....

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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