From ec8a83d45186449f11d0dfb63e0b7fad9c902378 Mon Sep 17 00:00:00 2001 From: Daigo Moriwaki Date: Sun, 15 Dec 2013 11:34:20 +0900 Subject: [PATCH] [webserver] - Listen on only IPv4 explicitly. --- changelog | 9 +++++++++ webserver | 1 + 2 files changed, 10 insertions(+) diff --git a/changelog b/changelog index d17e925..8721d51 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,12 @@ +2013-12-15 Daigo Moriwaki + + * [webserver] + - Listen on only IPv4 explicitly. Under ruby 1.9.3p194, without + any bind addresses, ruby attempts to listen on both "0.0.0.0" + and "::". Specifying "::" on Linux leads to listen on both IPv4 + and IPv6, which results in a warning message saying "Address + already in use - bind(2)". + 2013-12-13 Daigo Moriwaki * [shogi-server] diff --git a/webserver b/webserver index 97f8059..1c5acbd 100755 --- a/webserver +++ b/webserver @@ -151,6 +151,7 @@ def main http_log_file = File.join($options["dir"], "shogi-server-httpd.log") http_access_log_file = File.join($options["dir"], "shogi-server-access.log") http_config = {} + http_config[:BindAddress] = "0.0.0.0" http_config[:Port] = $options["port"] http_config[:ServerType] = WEBrick::Daemon if $options["daemon"] http_config[:Logger] = WEBrick::Log.new(http_log_file) -- 2.11.0