[Solved] (network.c.405) can't bind to port: 443 Address already in use
Added by catdisaster about 9 years ago
Hi!
Have a problem with starting:
root@ffmpeg14:/home/cat# service lighttpd restart * Stopping web server lighttpd [ OK ] * Starting web server lighttpd 2016-02-10 14:48:56: (network.c.405) can't bind to port: 443 Address already in use
---------------------------------------------------------------------------------------
root@ffmpeg14:/home/cat# cat /etc/lighttpd//lighttpd.conf
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_rewrite",
"mod_setenv",
"mod_status",
)
server.document-root = "/var/www"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
index-file.names = ( "index.py", "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
- Use ipv6 if available
#include_shell "/usr/share/lighttpd/use-ipv6.pl"
#dir-listing.encoding = "utf-8"
#server.dir-listing = "enable"
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/server.pem"
}
root@ffmpeg14:/home/cat#
-------------------------------------------------------------------------------------
root@ffmpeg14:/home/cat# cat /etc/lighttpd/conf-enabled/10-ssl.conf
- /usr/share/doc/lighttpd/ssl.txt
$SERVER["socket"] == "0.0.0.0:443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/server.pem"
ssl.cipher-list = "ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM"
ssl.honor-cipher-order = "enable"
}
root@ffmpeg14:/home/cat#
-------------------------------------------------------------------------------------
root@ffmpeg14:/home/cat# lsof i>10.20.2.212:52523 (ESTABLISHED)
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 1295 root 3u IPv4 23656 0t0 TCP *:ssh (LISTEN)
sshd 1295 root 4u IPv6 23658 0t0 TCP *:ssh (LISTEN)
mysqld 1381 mysql 10u IPv4 25707 0t0 TCP localhost:mysql (LISTEN)
sshd 1597 root 3u IPv4 554 0t0 TCP ffmpeg14:ssh
sshd 1656 cat 3u IPv4 554 0t0 TCP ffmpeg14:ssh->10.20.2.212:52523 (ESTABLISHED)
miniserv. 3743 root 5u IPv4 41056 0t0 TCP *:webmin (LISTEN)
miniserv. 3743 root 6u IPv4 41057 0t0 UDP *:10000
root@ffmpeg14:/home/cat#
Thanks in advance
Replies (1)
RE: (network.c.405) can't bind to port: 443 Address already in use - Added by gstrauss about 9 years ago
$SERVER["socket"] ":443" { ... }
and
$SERVER["socket"] "0.0.0.0:443" { ... }
both refer to the same address INADDR_ANY, and so the second one will fail with "Address already in use" when lighttpd attempts to bind to it.
Remove the duplicate and you should startup just fine. :)