# # # add_file "contrib/lighttpd.sample.conf" # content [5f5099a4d5b6181550726521b9db64e069188e59] # # patch "cmd_scgi.cc" # from [4b111b0c791f43e187fc457fd3dfe82ce75922de] # to [da1c60b8ddff8d3c0eddf69d2f4f48097ae57c6d] # # patch "http_client.cc" # from [01ad87bb1795c9e9c66a9c6f108671fb6eb2eaff] # to [8f0fc91f82fe51cb0e1c650b88bae59fb61d8ed6] # # patch "options_list.hh" # from [1f1eb3ce7a6a72870d0a42ef7f79b58eef621127] # to [43ce791b484db1eb8b4d340f19e51d82edfa4500] # ============================================================ --- contrib/lighttpd.sample.conf 5f5099a4d5b6181550726521b9db64e069188e59 +++ contrib/lighttpd.sample.conf 5f5099a4d5b6181550726521b9db64e069188e59 @@ -0,0 +1,30 @@ +# A very simple sample configuration for lighttpd to serve gsync +# requests to a monotone SCGI service. +# +# Start lighttpd with something like: +# /usr/sbin/lighttpd -f contrib/lighttpd.sample.conf +# + +# address and port to listen on +server.bind = "localhost" +server.port = 8080 + +server.modules += ( "mod_scgi", + "mod_accesslog") + +# make sure to adjust these files and directories +server.document-root = "/tmp" +server.errorlog = "/tmp/lighttpd.error.log" +accesslog.filename = "/tmp/access.log" +server.pid-file = "/tmp/lighttpd.pid" + +scgi.server = ( + "/monotone/" => (( + "host" => "127.0.0.1", + "port" => 3000, + "max-procs" => 1, + "idle-timeout" => 30, + "check-local" => "disable" + )) +) + ============================================================ --- cmd_scgi.cc 4b111b0c791f43e187fc457fd3dfe82ce75922de +++ cmd_scgi.cc da1c60b8ddff8d3c0eddf69d2f4f48097ae57c6d @@ -222,7 +222,7 @@ CMD_NO_WORKSPACE(scgi, // C N_(""), // params N_("Serves SCGI+JSON connections"), // abstract "", // desc - options::opts::bind | + options::opts::scgi_bind | options::opts::pidfile | options::opts::bind_stdio | options::opts::no_transport_auth ============================================================ --- http_client.cc 01ad87bb1795c9e9c66a9c6f108671fb6eb2eaff +++ http_client.cc 8f0fc91f82fe51cb0e1c650b88bae59fb61d8ed6 @@ -53,9 +53,10 @@ http_client::http_client(app_state & app : app(app), u(u), include_pattern(include_pattern), - exclude_pattern(exclude_pattern), - stream(build_stream_to_server(app, u, include_pattern, exclude_pattern, - constants::default_http_port, + exclude_pattern(exclude_pattern), + stream(build_stream_to_server(app, u, include_pattern, exclude_pattern, + (u.port.empty() ? constants::default_http_port + : lexical_cast(u.port)), Netxx::Timeout(static_cast(constants::netsync_timeout_seconds)))), nb(new Netbuf(*stream)), io(new iostream(&(*nb))), ============================================================ --- options_list.hh 1f1eb3ce7a6a72870d0a42ef7f79b58eef621127 +++ options_list.hh 43ce791b484db1eb8b4d340f19e51d82edfa4500 @@ -46,6 +46,14 @@ OPTION(bind_opts, bind, true, "bind", bind_stdio = false; } #endif +OPTION(bind_opts, scgi_bind, true, "bind", + gettext_noop("address:port to listen on (default :3000)")) +#ifdef option_bodies +{ + bind_uris.push_back(utf8(arg)); + bind_stdio = false; +} +#endif OPTION(bind_opts, no_transport_auth, false, "no-transport-auth", gettext_noop("disable transport authentication")) #ifdef option_bodies