]> git.pld-linux.org Git - packages/lighttpd.git/commitdiff
package mod_sockproxy
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 29 Jan 2019 10:39:30 +0000 (12:39 +0200)
committerElan Ruusamäe <glen@pld-linux.org>
Tue, 29 Jan 2019 17:03:11 +0000 (19:03 +0200)
lighttpd.spec
mod_sockproxy.conf [new file with mode: 0644]

index 1a9d9bfd9eb42ca25c4c77baced4fcbfd38384b6..4ef12d95f11cb8b5f97eb46526383bc5e689c597 100644 (file)
@@ -112,6 +112,7 @@ Source142:  mod_openssl.conf
 Source143:     mod_vhostdb.conf
 Source144:     mod_wstunnel.conf
 Source145:     mod_authn_mysql.conf
+Source146:     mod_sockproxy.conf
 # use branch.sh script to create branch.diff
 #Patch100:     %{name}-branch.diff
 ## Patch100-md5:       7bd09235304c8bcb16f34d49d480c0fb
@@ -733,6 +734,17 @@ lighttpd module for simple virtual-hosting.
 %description mod_simple_vhost -l pl.UTF-8
 Moduł lighttpd do prostych hostów wirtualnych.
 
+%package mod_sockproxy
+Summary:       Transparent socket proxy
+Group:         Networking/Daemons/HTTP
+URL:           https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModSockProxy
+Requires:      %{name} = %{version}-%{release}
+
+%description mod_sockproxy
+mod_sockproxy is a transparent socket proxy. For a given $SERVER["socket"]
+config, connections will be forwarded to backend(s) without any
+interpretation of the protocol.
+
 %package mod_ssi
 Summary:       lighttpd module for server-side includes
 Summary(pl.UTF-8):     Moduł lighttpd do SSI (server-side includes)
@@ -1090,6 +1102,7 @@ cp -p %{SOURCE144} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_wstunnel.conf
 %if %{with mysql}
 cp -p %{SOURCE133} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_mysql_vhost.conf
 %endif
+cp -p %{SOURCE146} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_sockproxy.conf
 
 cp -p %{SOURCE134} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/55_mod_magnet.conf
 cp -p %{SOURCE111} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/55_mod_expire.conf
@@ -1209,6 +1222,7 @@ fi
 %module_scripts mod_secdownload
 %module_scripts mod_setenv
 %module_scripts mod_simple_vhost
+%module_scripts mod_sockproxy
 %module_scripts mod_ssi
 %module_scripts mod_staticfile
 %module_scripts mod_status
@@ -1467,6 +1481,11 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_simple_vhost.conf
 %attr(755,root,root) %{pkglibdir}/mod_simple_vhost.so
 
+%files mod_sockproxy
+%defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_sockproxy.conf
+%attr(755,root,root) %{pkglibdir}/mod_sockproxy.so
+
 %files mod_ssi
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_ssi.conf
diff --git a/mod_sockproxy.conf b/mod_sockproxy.conf
new file mode 100644 (file)
index 0000000..4a84e9e
--- /dev/null
@@ -0,0 +1,37 @@
+# Transparent socket proxy (available since lighttpd 1.4.51)
+#
+# mod_sockproxy is a transparent socket proxy. For a given $SERVER["socket"]
+# config, connections will be forwarded to backend(s) without any
+# interpretation of the protocol.
+#
+# Documentation: https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModSockProxy
+
+server.modules += (
+       "mod_sockproxy"
+)
+
+# debug level (value between 0 and 65535)
+#sockproxy.debug = 0
+
+# sockproxy.balance:
+# might be one of 'fair' (default), 'hash', 'round-robin' or 'sticky'.
+# - 'fair' or 'least-connection' is the normal load-based, passive balancing.
+# - 'round-robin' chooses another host for each request.
+# - 'hash' is generating a hash over the request-uri and makes sure that the
+#    same request URI is sent to always the same host. That can increase the
+#    performance of the backend servers a lot due to higher cache-locality.
+# - 'sticky' (since 1.4.44) sends requests from the same (client) IP to the same backend.
+#sockproxy.balance = "fair"
+
+# sockproxy.server:
+# backend server definition(s) for hosts to which to send requests; options for
+# each backend host. Every file-extension can have its own handler.
+# Load-balancing is done by specifying multiple hosts for the same extension.
+#sockproxy.server = (
+#      "" => (
+#              (
+#                      "host" => "10.0.0.242",
+#                      "port" => 10000,
+#              ),
+#      ),
+#)
This page took 0.064097 seconds and 4 git commands to generate.