From c5ecec4df0df09459e51e9c2ecc5d44872e62cbb Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Tue, 7 Apr 2020 01:11:58 +0200 Subject: [PATCH] - missing conf files --- mod_maxminddb.conf | 34 ++++++++++++++++++++++++++++++++++ mod_sockproxy.conf | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 mod_maxminddb.conf create mode 100644 mod_sockproxy.conf diff --git a/mod_maxminddb.conf b/mod_maxminddb.conf new file mode 100644 index 0000000..fcc3e66 --- /dev/null +++ b/mod_maxminddb.conf @@ -0,0 +1,34 @@ +# Module for IP Based Geographic Lookups +# +# Documentation: https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModMaxMindDB +# +# mod_maxminddb is a module for fast ip/location lookups. It uses MaxMind +# GeoIP2 databases. If the IP was found in the database, the module sets the +# appropriate environment variables to the request, thus making this +# information available to other modules/fcgi. +# +# Redirecting based on GeoIP2 data can be performed inside lighttpd using +# mod_magnet or using backend CGI, FastCGI, SCGI, etc. +# +# mod_maxminddb consumes MaxMind GeoIP2 databases. This is the successor to +# GeoIP Legacy databases. GeoIP Legacy databases were discontinued 2 Jan 2019 +# (https://dev.maxmind.com/geoip/legacy/release-notes/) and mod_geoip is now +# deprecated. + +server.modules += ( + "mod_maxminddb" +) + +# default: "disable" +#maxminddb.activate = "enable" + +#maxminddb.db = "/path/to/the/GeoIP2/database.mmdb" + +# list of environment variables to set and associated lookup keys in GeoIP2 .mmdb. +#maxminddb.env = ( +# "GEOIP_COUNTRY_CODE" => "country/iso_code", +# "GEOIP_COUNTRY_NAME" => "country/names/en", +# "GEOIP_CITY_NAME" => "city/names/en", +# "GEOIP_CITY_LATITUDE" => "location/latitude", +# "GEOIP_CITY_LONGITUDE" => "location/longitude", +#) diff --git a/mod_sockproxy.conf b/mod_sockproxy.conf new file mode 100644 index 0000000..4a84e9e --- /dev/null +++ b/mod_sockproxy.conf @@ -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, +# ), +# ), +#) -- 2.46.0