Hello community,
here is the log from the commit of package lighttpd
checked in at Mon Jul 30 21:47:39 CEST 2007.
--------
--- lighttpd/lighttpd.changes 2007-03-26 14:28:31.000000000 +0200
+++ /mounts/work_src_done/STABLE/lighttpd/lighttpd.changes 2007-07-25 14:16:13.135169000 +0200
@@ -1,0 +2,103 @@
+Wed Jul 25 14:02:32 CEST 2007 - mrueckert@suse.de
+
+- update to 1.4.16
+ * added static-file.etags, etag.use-inode, etag.use-mtime,
+ etag.use-size to customize the generation of ETags for static
+ files. (#1209) (patch by )
+ * fixed typecast of NULL on execl() (#1235)
+ (patch by F. Denis)
+ * fixed circumventing url.access-deny by trailing slash (#1230)
+ * fixed crash on duplicate headers with trailing WS (#1232)
+ * fixed accepting more connections then requested (#1216)
+ * fixed mem-leak in mod_auth (reported by Stefan Esser)
+ * fixed crash with md5-sess and cnonce not set in mod_auth
+ (reported by Stefan Esser)
+ * fixed missing check for base64 encoded string in mod_auth and
+ Basic auth (reported by Stefan Esser)
+ * fixed possible crash in Auth-Digest header parser on trailing
+ WS in mod_auth (reported by Stefan Esser)
+ * fixed check on stale errno values, which broke handling of
+ broken fastcgi applications. (#1245)
+ * fixed crash on 32bit archs when debug-msgs are printed in
+ mod_scgi, mod_fastcgi and mod_webdav (#1263)
+- removed lighttpd-1.4.x_mod_status_orig_uri.patch:
+ included upstream
+
+-------------------------------------------------------------------
+Fri May 25 16:37:55 CEST 2007 - mrueckert@suse.de
+
+- added lighttpd-1.4.x_mod_status_orig_uri.patch:
+ show the original request uri in the mod_status output
+
+-------------------------------------------------------------------
+Mon May 14 13:51:01 CEST 2007 - mrueckert@suse.de
+
+- synced spec with the -snapshot rpms
+
+-------------------------------------------------------------------
+Thu Apr 19 19:55:35 CEST 2007 - mrueckert@suse.de
+
+- added /var/lib/lighttpd/sockets/
+
+-------------------------------------------------------------------
+Mon Apr 16 08:36:26 CEST 2007 - mrueckert@suse.de
+
+- update to 1.4.15:
+ * fixed broken Set-Cookie headers
+- additional changes from 1.4.14: (includes fixes for bnc:#246945)
+ * fix crash if gethostbyaddr() failed on redirect [1718]
+ * properly handle 206 responses generated by *cgi scripts.
+ (#755) [1716]
+ * added HTTPS=on to the environment of cgi scripts (#861) [1684]
+ * fix handling of 303 (#1045) [1678]
+ * made the configure check for lua more portable [1677]
+ * added mod_extforward module [1665]
+ * references to the fam stat cache engine should be conditional
+ (#1039) [1664]
+ * fix http 500 errors (colin.stephen/at/o2.com) #1041 [1663]
+ * prevent wrong pidfile unlinking on graceful restart
+ (Chris Webb) [1656]
+ * ignore empty packets from STDERR stream. #998
+ * fix a crash for files with an mtime of 0 reported by cubiq on
+ irc [1519] CVE-2007-1870
+ * allow empty passwords with ldap (Jörg Sonnenberger) [1516]
+ * mod_scgi.c segfault fix #964 [1501]
+ * Added round-robin support to mod_fastcgi [1500]
+ * Handle DragonFlyBSD the same way as Freebsd
+ (Jörg Sonnenberger) [1492,1676]
+ * added now and weeks support to mod_expire. #943
+ * fix cpu hog in certain requests [1473] CVE-2007-1869
+ * fix for handling hostnames with trailing dot [1406]
+ * fixed header-injection via server.tag (#1106)
+ * disabled caching of files without a content-type to solve the
+ aggressive caching of FF
+ * remove trailing white-spaces from HTTP-requests before parsing
+ (#1098)
+ * fixed accesslog.use-syslog in a conditional and the caching of
+ the accesslog for files (fixes #1064)
+ * fixed various crashes at startup on broken accesslog.format
+ strings (#1000)
+ * fixed handling of %% in accesslog.format
+ * fixed conditional dir-listing.exclude (#930)
+ * reduced default PATH_MAX to 255 (#826)
+ * ECONNABORTED is not known on cygwin (#863)
+ * fixed crash on url.redirect and url.rewrite if %0 is used in
+ a global context (#800)
+ * fixed possible crash in debug-message in mod_extforward
+ * fixed compilation of mod_extforward on glibc < 2.3.4
+ * fixed include of empty in the configfiles (#1076)
+ * send SIGUSR1 to fastcgi children before SIGTERM. libfcgi
+ wants SIGUSR1. (#737)
+ * fixed missing AUTH_TYPE entry in the fastcgi environment.
+ (#889)
+ * fixed compilation in network_writev.c on MacOS X 10.3.9 (#903)
+ * added kill-signal as another setting for fastcgi backends. See
+ the wiki for more.
+- fixed the default config: (#254820)
+ it broke when module configs used variables
+- added zlib-devel and libbz2-devel to the buildrequires for 10.3+
+- added proper conditionals for older distros
+- added optional mod_geoip module. (only build on the buildservice)
+- added mod_magnet config file
+
+-------------------------------------------------------------------
@@ -6,0 +110,5 @@
+Sat Dec 2 23:33:26 CET 2006 - mrueckert@suse.de
+
+- fixed building on sles9
+
+-------------------------------------------------------------------
@@ -19 +127 @@
- * fixed segfault in splitted CRLF CRLF sequences
+ * fixed segfault in splitted CRLF CRLF sequences
@@ -24 +132 @@
- * fixed Content-Length = 0 on HEAD requests without
+ * fixed Content-Length = 0 on HEAD requests without
@@ -28 +136 @@
- * removed warning about a 404-error-handler
+ * removed warning about a 404-error-handler
@@ -66 +174 @@
- o fixed handling of If-Modified-Since if ETag is not set
+ o fixed handling of If-Modified-Since if ETag is not set
@@ -70 +178 @@
- o fixed conditional server.allow-http-11
+ o fixed conditional server.allow-http-11
@@ -76 +184 @@
- o added ability to specify which ip address spawn-fci listens on
+ o added ability to specify which ip address spawn-fci listens on
@@ -79 +187 @@
- o fixed handling of error codes returned by mod_dav_svn behing a
+ o fixed handling of error codes returned by mod_dav_svn behing a
@@ -86 +194 @@
- o fixed local source retrieval on windows
+ o fixed local source retrieval on windows
@@ -88 +196 @@
- o fixed hanging cgi if remote side is dieing while reading
+ o fixed hanging cgi if remote side is dieing while reading
@@ -91,0 +200,5 @@
+Thu Jul 20 19:47:22 CEST 2006 - olh@suse.de
+
+- remove unused neon from buildrequires
+
+-------------------------------------------------------------------
@@ -118,5 +230,0 @@
-Thu Jul 20 19:47:22 CEST 2006 - olh@suse.de
-
-- remove unused neon from buildrequires
-
--------------------------------------------------------------------
@@ -246 +354 @@
- * changed auth.ldap-cafile to be optional
+ * changed auth.ldap-cafile to be optional
@@ -250 +358 @@
- * added support to let the server listen on UNIX-socket
+ * added support to let the server listen on UNIX-socket
@@ -257 +365 @@
- * fixed possible crash in mod_webdav if sqlite3 support
+ * fixed possible crash in mod_webdav if sqlite3 support
@@ -261 +369 @@
- * fixed assert() in "connections.c:962:
+ * fixed assert() in "connections.c:962:
Old:
----
lighttpd-1.4.13.tar.bz2
New:
----
lighttpd-1.4.13_geoip.patch
lighttpd-1.4.16.tar.bz2
lighttpd.SuSEfirewall
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lighttpd.spec ++++++
--- /var/tmp/diff_new_pack.T20014/_old 2007-07-30 21:46:08.000000000 +0200
+++ /var/tmp/diff_new_pack.T20014/_new 2007-07-30 21:46:08.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package lighttpd (Version 1.4.13)
+# spec file for package lighttpd (Version 1.4.16)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,34 +11,69 @@
# norootforbuild
Name: lighttpd
+Version: 1.4.16
+Release: 1
+#
%define pkg_name lighttpd
+%define pkg_user lighttpd
%define pkg_home /var/lib/%{pkg_name}
-Version: 1.4.13
-Release: 38
#
Group: Productivity/Networking/Web/Servers
-License: BSD License and BSD-like
+License: BSD 3-Clause, http://www.lighttpd.net/download/COPYING
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: FastCGI-devel e2fsprogs-devel fam-devel gdbm-devel libattr-devel libmemcache-devel libxml2-devel mysql-devel openldap2-devel pam-devel pcre-devel php5-fastcgi pkgconfig sqlite-devel
+BuildRequires: FastCGI-devel e2fsprogs-devel fam-devel gdbm-devel libattr-devel libmemcache-devel libxml2-devel mysql-devel openldap2-devel pcre-devel pkgconfig pwdutils zlib-devel
+#
+%define with_tests 1
+%define with_enh_webdav 1
+%define with_mod_magnet 1
+%if 0%{?sles_version} == 9
+%define with_tests 0
+%define with_enh_webdav 0
+%endif
+%if 0%{?suse_version} > 1020
+%define with_susefirewall_config 1
+%endif
+#
+%if 0%{?with_enh_webdav}
+BuildRequires: sqlite-devel >= 3
+%endif
+#
%if 0%{?opensuse_bs}
BuildRequires: lua51-devel
+%define with_geoip 1
%else
BuildRequires: lua-devel
+%if 0%{sles_version}
+%define with_mod_magnet 0
+%endif
+%endif
+#
+%if 0%{?with_geoip}
+BuildRequires: GeoIP-devel
+%endif
+#
+%if 0%{?with_tests}
+BuildRequires: php5-fastcgi
%endif
-%if 0%{?suse_version} == 930
+#
+%if 0%{?suse_version} == 930 || 0%{?sles_version} == 9
BuildRequires: libstdc++-devel
%endif
+%if 0%{?suse_version} > 1020
+BuildRequires: libbz2-devel
+%endif
PreReq: %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/sbin/useradd
#
URL: http://www.lighttpd.net/
-# http://www.lighttpd.net/download/lighttpd-%{version}.tar.gz
-Source: %{pkg_name}-%{version}.tar.bz2
+Source: http://www.lighttpd.net/download/%{pkg_name}-%{version}.tar.bz2
Source1: %{pkg_name}.init
Source2: %{pkg_name}.sysconfig
Source3: config.tar.bz2
Source4: lightytest.sh
+Source5: %{pkg_name}.SuSEfirewall
Patch1: lighttpd-1.4.10_testsuite.patch
+Patch2: lighttpd-1.4.13_geoip.patch
#
Summary: A Secure, Fast, Compliant, and Very Flexible Web Server
@@ -57,7 +92,7 @@
Jan Kneschke
%package mod_cml
-Requires: %{pkg_name} = %{version}
+Requires: %{name} = %{version}
Group: Productivity/Networking/Web/Servers
Summary: CML (Cache Meta Language) module for Lighttpd
@@ -85,7 +120,7 @@
Jan Kneschke
%package mod_magnet
-Requires: %{pkg_name} = %{version}
+Requires: %{name} = %{version}
Group: Productivity/Networking/Web/Servers
Summary: A module to control the request handling in lighttpd
@@ -101,7 +136,7 @@
Jan Kneschke
%package mod_mysql_vhost
-Requires: %{pkg_name} = %{version}
+Requires: %{name} = %{version}
Group: Productivity/Networking/Web/Servers
Summary: MySQL based virtual hosts (vhosts) module for Lighttpd
@@ -116,7 +151,7 @@
Jan Kneschke
%package mod_trigger_b4_dl
-Requires: %{pkg_name} = %{version}
+Requires: %{name} = %{version}
Group: Productivity/Networking/Web/Servers
Summary: Another anti hot-linking module for Lighttpd
@@ -142,7 +177,7 @@
Jan Kneschke
%package mod_rrdtool
-Requires: %{pkg_name} = %{version}
+Requires: %{name} = %{version}
Requires: rrdtool
Group: Productivity/Networking/Web/Servers
Summary: Lighttpd module to feed rrdtool databases
@@ -160,8 +195,32 @@
--------
Jan Kneschke
+%if 0%{?with_geoip}
+%package mod_geoip
+Requires: %{name} = %{version}
+Group: Productivity/Networking/Web/Servers
+Summary: A Secure, Fast, Compliant, and Very Flexible Web Server
+
+%description mod_geoip
+Lighttpd a secure, fast, compliant, and very flexible Web server that
+has been optimized for high-performance environments. It has a very low
+memory footprint compared to other Web servers and takes care of CPU
+load. Its advanced feature set (FastCGI, CGI, Auth,
+Output-Compression, URL-Rewriting, and more) makes lighttpd the perfect
+Web server software for every server that is suffering load problems.
+
+This is just a dummy package which is not build in autobuild. see the
+buildservice project server:http if you want it.
+
+
+
+Authors:
+--------
+ Jan Kneschke
+
+%endif
%package mod_webdav
-Requires: %{pkg_name} = %{version}
+Requires: %{name} = %{version}
Group: Productivity/Networking/Web/Servers
Summary: WebDAV module for Lighttpd
@@ -195,10 +254,15 @@
%prep
%setup -a 3
%patch1
+%if 0%{?with_geoip}
+%patch2
+%endif
%build
-#autoreconf -fi
-export CFLAGS="%{optflags} -DLDAP_DEPRECATED -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast"
+%if 0%{?with_geoip}
+autoreconf -fi
+%endif
+export CFLAGS="%{optflags} -DLDAP_DEPRECATED -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -std=gnu99"
%if %suse_version > 1000
export CFLAGS="$CFLAGS -fstack-protector"
%endif
@@ -210,31 +274,34 @@
--with-ldap \
--with-mysql \
--with-openssl \
+ --with-kerberos5 \
--with-gdbm \
--with-lua \
--with-memcache \
--with-bzip2 \
--with-webdav \
+%if 0%{?with_enh_webdav}
--with-webdav-props \
--with-webdav-locks \
+%endif
--with-fam \
--with-attr
%{__make}
+%if 0%{?with_tests}
sh -x %{S:4}
+%endif
%install
%makeinstall
-%{__install} -Dd -m 0755 \
- %{buildroot}%{pkg_home} \
+%{__install} -d -m 0755 \
+ %{buildroot}%{pkg_home}/sockets/ \
%{buildroot}%{_var}/cache/%{pkg_name}/compress \
%{buildroot}%{_var}/log/%{pkg_name} \
- %{buildroot}%{_sysconfdir}/%{pkg_name} \
- %{buildroot}%{_sysconfdir}/init.d \
- %{buildroot}/var/adm/fillup-templates/
+ %{buildroot}%{_sysconfdir}/%{pkg_name}
#
# init script
#
-%{__install} -m 0755 %{S:1} \
+%{__install} -D -m 0755 %{S:1} \
%{buildroot}%{_sysconfdir}/init.d/%{pkg_name}
%{__ln_s} -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}
#
@@ -242,14 +309,25 @@
#
perl -p -i.orig -e 's|^(server\.tag = ).*$|$1 "%{pkg_name} (%{version}/SuSE)"|' config/lighttpd.conf
diff -ur config/lighttpd.conf{.orig,} ||:
-rm -f config/lighttpd.conf.orig ||:
+%{__rm} -vf config/lighttpd.conf.orig ||:
%{__cp} -rv config/* %{buildroot}%{_sysconfdir}/%{pkg_name}/
+# only needed when build with mod_geoip support
+%if ! 0%{?with_geoip}
+%{__rm} -v %{buildroot}%{_sysconfdir}/%{pkg_name}/conf.d/geoip.conf
+%endif
#
# sysconfig template
#
-%{__install} -m 0644 %{S:2} \
+%{__install} -D -m 0644 %{S:2} \
%{buildroot}/var/adm/fillup-templates/sysconfig.%{pkg_name}
#
+# susefirewall config file
+#
+%if 0%{?with_susefirewall_config}
+%{__install} -D -m 0644 %{S:5} \
+ %{buildroot}/etc/sysconfig/SuSEfirewall2.d/services/lighttpd
+%endif
+#
# remove the .la files. we dont need them.
#
%{__rm} -vf %{buildroot}%{_libdir}/%{pkg_name}/*.la
@@ -261,8 +339,8 @@
#
# e.g. adding user
#
-/usr/sbin/groupadd -r %{pkg_name} &>/dev/null ||:
-/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r -c "user for %{pkg_name}" -d %{pkg_home} %{pkg_name} &>/dev/null ||:
+/usr/sbin/groupadd -r %{pkg_user} &>/dev/null ||:
+/usr/sbin/useradd -g %{pkg_user} -s /bin/false -r -c "user for %{pkg_user}" -d %{pkg_home} %{pkg_user} &>/dev/null ||:
%post
%fillup_and_insserv %{pkg_name}
@@ -276,32 +354,35 @@
%files
%defattr(-,root,root,-)
+%if 0%{?with_susefirewall_config}
+/etc/sysconfig/SuSEfirewall2.d/services/lighttpd
+%endif
%{_sbindir}/*
-%dir %attr(750,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}
-%dir %attr(750,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d
-%dir %attr(750,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/vhosts.d
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/lighttpd.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/modules.conf
+%dir %attr(750,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}
+%dir %attr(750,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d
+%dir %attr(750,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/vhosts.d
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/lighttpd.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/modules.conf
# modules config
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/access_log.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/auth.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/cgi.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/compress.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/debug.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/dirlisting.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/evhost.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/expire.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/fastcgi.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/mime.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/mod.template
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/proxy.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/scgi.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/secdownload.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/simplev_host.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/ssi.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/status.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/userdir.conf
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/vhosts.d/vhosts.template
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/access_log.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/auth.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/cgi.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/compress.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/debug.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/dirlisting.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/evhost.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/expire.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/fastcgi.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/mime.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/mod.template
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/proxy.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/scgi.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/secdownload.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/simple_vhost.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/ssi.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/status.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/userdir.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/vhosts.d/vhosts.template
# modules
%dir %{_libdir}/%{pkg_name}
%{_libdir}/%{pkg_name}/mod_access.so
@@ -314,6 +395,7 @@
%{_libdir}/%{pkg_name}/mod_evasive.so
%{_libdir}/%{pkg_name}/mod_evhost.so
%{_libdir}/%{pkg_name}/mod_expire.so
+%{_libdir}/%{pkg_name}/mod_extforward.so
%{_libdir}/%{pkg_name}/mod_fastcgi.so
%{_libdir}/%{pkg_name}/mod_flv_streaming.so
%{_libdir}/%{pkg_name}/mod_indexfile.so
@@ -330,7 +412,7 @@
%{_libdir}/%{pkg_name}/mod_userdir.so
%{_libdir}/%{pkg_name}/mod_usertrack.so
%{_mandir}/man1/*.1*
-%{_sysconfdir}/init.d/%{pkg_name}
+%config(noreplace) %{_sysconfdir}/init.d/%{pkg_name}
%doc AUTHORS ChangeLog NEWS README
%doc doc/*.dot
%doc doc/spawn-php.sh
@@ -363,49 +445,149 @@
%doc doc/traffic-shaping.txt
%doc doc/userdir.txt
/var/adm/fillup-templates/sysconfig.%{pkg_name}
-%dir %attr(750,%{pkg_name},%{pkg_name}) %{pkg_home}
-%attr(750,%{pkg_name},%{pkg_name}) %{_var}/cache/%{pkg_name}/
-%dir %attr(750,%{pkg_name},%{pkg_name}) %{_var}/log/%{pkg_name}
+%dir %attr(751,%{pkg_user},%{pkg_user}) %{pkg_home}/
+%dir %attr(751,%{pkg_user},%{pkg_user}) %{pkg_home}/sockets/
+%attr(751,%{pkg_user},%{pkg_user}) %{_var}/cache/%{pkg_name}/
+%dir %attr(750,%{pkg_user},%{pkg_user}) %{_var}/log/%{pkg_name}/
%files mod_rrdtool
%defattr(-,root,root,-)
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/rrdtool.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/rrdtool.conf
%doc doc/rrdtool.txt
%doc doc/rrdtool-graph.sh
%{_libdir}/%{pkg_name}/mod_rrdtool.so
%files mod_cml
%defattr(-,root,root,-)
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/cml.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/cml.conf
%{_libdir}/%{pkg_name}/mod_cml.so
%doc doc/cml.txt
%files mod_magnet
%defattr(-,root,root,-)
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/magnet.conf
%{_libdir}/%{pkg_name}/mod_magnet.so
%doc doc/magnet.txt
%files mod_mysql_vhost
%defattr(-,root,root,-)
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/mysql_vhost.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/mysql_vhost.conf
%{_libdir}/%{pkg_name}/mod_mysql_vhost.so
%doc doc/mysqlvhost.txt
%files mod_trigger_b4_dl
%defattr(-,root,root,-)
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/trigger_b4_dl.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/trigger_b4_dl.conf
%{_libdir}/%{pkg_name}/mod_trigger_b4_dl.so
%doc doc/trigger_b4_dl.txt
+%if 0%{?with_geoip}
+
+%files mod_geoip
+%defattr(-,root,root,-)
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/geoip.conf
+%doc doc/geoip.txt
+%{_libdir}/%{pkg_name}/mod_geoip.so
+%endif
%files mod_webdav
%defattr(-,root,root,-)
-%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/%{pkg_name}/conf.d/webdav.conf
+%config(noreplace) %attr(640,root,%{pkg_user}) %{_sysconfdir}/%{pkg_name}/conf.d/webdav.conf
%{_libdir}/%{pkg_name}/mod_webdav.so
%doc doc/webdav.txt
%changelog
+* Wed Jul 25 2007 - mrueckert@suse.de
+- update to 1.4.16
+ * added static-file.etags, etag.use-inode, etag.use-mtime,
+ etag.use-size to customize the generation of ETags for static
+ files. (#1209) (patch by )
+ * fixed typecast of NULL on execl() (#1235)
+ (patch by F. Denis)
+ * fixed circumventing url.access-deny by trailing slash (#1230)
+ * fixed crash on duplicate headers with trailing WS (#1232)
+ * fixed accepting more connections then requested (#1216)
+ * fixed mem-leak in mod_auth (reported by Stefan Esser)
+ * fixed crash with md5-sess and cnonce not set in mod_auth
+ (reported by Stefan Esser)
+ * fixed missing check for base64 encoded string in mod_auth and
+ Basic auth (reported by Stefan Esser)
+ * fixed possible crash in Auth-Digest header parser on trailing
+ WS in mod_auth (reported by Stefan Esser)
+ * fixed check on stale errno values, which broke handling of
+ broken fastcgi applications. (#1245)
+ * fixed crash on 32bit archs when debug-msgs are printed in
+ mod_scgi, mod_fastcgi and mod_webdav (#1263)
+- removed lighttpd-1.4.x_mod_status_orig_uri.patch:
+ included upstream
+* Fri May 25 2007 - mrueckert@suse.de
+- added lighttpd-1.4.x_mod_status_orig_uri.patch:
+ show the original request uri in the mod_status output
+* Mon May 14 2007 - mrueckert@suse.de
+- synced spec with the -snapshot rpms
+* Thu Apr 19 2007 - mrueckert@suse.de
+- added /var/lib/lighttpd/sockets/
+* Mon Apr 16 2007 - mrueckert@suse.de
+- update to 1.4.15:
+ * fixed broken Set-Cookie headers
+- additional changes from 1.4.14: (includes fixes for bnc:#246945)
+ * fix crash if gethostbyaddr() failed on redirect [1718]
+ * properly handle 206 responses generated by *cgi scripts.
+ (#755) [1716]
+ * added HTTPS=on to the environment of cgi scripts (#861) [1684]
+ * fix handling of 303 (#1045) [1678]
+ * made the configure check for lua more portable [1677]
+ * added mod_extforward module [1665]
+ * references to the fam stat cache engine should be conditional
+ (#1039) [1664]
+ * fix http 500 errors (colin.stephen/at/o2.com) #1041 [1663]
+ * prevent wrong pidfile unlinking on graceful restart
+ (Chris Webb) [1656]
+ * ignore empty packets from STDERR stream. #998
+ * fix a crash for files with an mtime of 0 reported by cubiq on
+ irc [1519] CVE-2007-1870
+ * allow empty passwords with ldap (Jörg Sonnenberger) [1516]
+ * mod_scgi.c segfault fix #964 [1501]
+ * Added round-robin support to mod_fastcgi [1500]
+ * Handle DragonFlyBSD the same way as Freebsd
+ (Jörg Sonnenberger) [1492,1676]
+ * added now and weeks support to mod_expire. #943
+ * fix cpu hog in certain requests [1473] CVE-2007-1869
+ * fix for handling hostnames with trailing dot [1406]
+ * fixed header-injection via server.tag (#1106)
+ * disabled caching of files without a content-type to solve the
+ aggressive caching of FF
+ * remove trailing white-spaces from HTTP-requests before parsing
+ (#1098)
+ * fixed accesslog.use-syslog in a conditional and the caching of
+ the accesslog for files (fixes #1064)
+ * fixed various crashes at startup on broken accesslog.format
+ strings (#1000)
+ * fixed handling of %% in accesslog.format
+ * fixed conditional dir-listing.exclude (#930)
+ * reduced default PATH_MAX to 255 (#826)
+ * ECONNABORTED is not known on cygwin (#863)
+ * fixed crash on url.redirect and url.rewrite if %%0 is used in
+ a global context (#800)
+ * fixed possible crash in debug-message in mod_extforward
+ * fixed compilation of mod_extforward on glibc < 2.3.4
+ * fixed include of empty in the configfiles (#1076)
+ * send SIGUSR1 to fastcgi children before SIGTERM. libfcgi
+ wants SIGUSR1. (#737)
+ * fixed missing AUTH_TYPE entry in the fastcgi environment.
+ (#889)
+ * fixed compilation in network_writev.c on MacOS X 10.3.9 (#903)
+ * added kill-signal as another setting for fastcgi backends. See
+ the wiki for more.
+- fixed the default config: (#254820)
+ it broke when module configs used variables
+- added zlib-devel and libbz2-devel to the buildrequires for 10.3+
+- added proper conditionals for older distros
+- added optional mod_geoip module. (only build on the buildservice)
+- added mod_magnet config file
* Mon Mar 26 2007 - rguenther@suse.de
- Add gdbm-devel BuildRequires
+* Sat Dec 02 2006 - mrueckert@suse.de
+- fixed building on sles9
* Thu Oct 19 2006 - mrueckert@suse.de
- Factory has 5.1.1. so allow building against plain lua-devel
* Tue Oct 10 2006 - mrueckert@suse.de
++++++ config.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/access_log.conf new/config/conf.d/access_log.conf
--- old/config/conf.d/access_log.conf 2006-03-06 01:14:14.000000000 +0100
+++ new/config/conf.d/access_log.conf 2006-04-06 01:09:05.000000000 +0200
@@ -9,7 +9,7 @@
##
## Default access log.
##
-accesslog.filename = log_root + "access.log"
+accesslog.filename = log_root + "/access.log"
##
## The default format produces CLF compatible output.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/compress.conf new/config/conf.d/compress.conf
--- old/config/conf.d/compress.conf 2006-03-06 01:14:14.000000000 +0100
+++ new/config/conf.d/compress.conf 2006-04-06 03:31:43.000000000 +0200
@@ -14,7 +14,7 @@
## This directory should be changed per vhost otherwise you can
## run into trouble with overlapping filenames
##
-compress.cache-dir = cache_dir
+compress.cache-dir = cache_dir + "/compress"
##
## FileTypes to compress.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/evhost.conf new/config/conf.d/evhost.conf
--- old/config/conf.d/evhost.conf 2006-03-06 01:14:14.000000000 +0100
+++ new/config/conf.d/evhost.conf 2006-04-06 01:10:50.000000000 +0200
@@ -16,7 +16,7 @@
## %3 => subdomain 1 name
## %4 => subdomain 2 name
##
-evhost.path-pattern = server_root + "/vhosts/%3/htdocs/"
+evhost.path-pattern = vhosts_dir + "/%3/htdocs/"
##
#######################################################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/fastcgi.conf new/config/conf.d/fastcgi.conf
--- old/config/conf.d/fastcgi.conf 2006-03-06 01:14:14.000000000 +0100
+++ new/config/conf.d/fastcgi.conf 2006-05-01 22:47:36.000000000 +0200
@@ -11,18 +11,42 @@
## PHP Example
## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
##
+## The number of php processes you will get can be easily calculated:
+##
+## num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN )
+##
+## for the php-num-procs example it means you will get 17*5 = 85 php
+## processes. you always should need this high number for your very
+## busy sites. And if you have a lot of RAM. :)
+##
#fastcgi.server = ( ".php" =>
# ( "php-local" =>
# (
-# "socket" => home_dir + "/php-fastcgi.socket",
-# "bin-path" => server_root + "/cgi-bin/php5"
+# "socket" => socket_dir + "/php-fastcgi-1.socket",
+# "bin-path" => server_root + "/cgi-bin/php5",
+# "max-procs" => 1,
+# "broken-scriptfilename" => "enable",
# )
# ),
# ( "php-tcp" =>
# (
# "host" => "127.0.0.1",
# "port" => 9999,
-# "check-local" => "disable"
+# "check-local" => "disable",
+# "broken-scriptfilename" => "enable",
+# )
+# ),
+#
+# ( "php-num-procs" =>
+# (
+# "socket" => socket_dir + "/php-fastcgi-2.socket",
+# "bin-path" => server_root + "/cgi-bin/php5",
+# "bin-environment" => (
+# "PHP_FCGI_CHILDREN" => "16",
+# "PHP_FCGI_MAX_REQUESTS" => "10000",
+# ),
+# "max-procs" => 5,
+# "broken-scriptfilename" => "enable",
# )
# ),
# )
@@ -37,11 +61,11 @@
# server.error-handler-404 = "/dispatch.fcgi"
# fastcgi.server = ( ".fcgi" =>
# ("someapp" =>
-# ( "socket" => home_dir + "/someapp-fcgi.socket",
+# ( "socket" => socket_dir + "/someapp-fcgi.socket",
# "bin-path" => server_root + "/rails/someapp/public/dispatch.fcgi",
# "bin-environment" => (
# "RAILS_ENV" => "production",
-# "TMP" => home_dir + "/rails/someapp"
+# "TMP" => home_dir + "/rails/someapp",
# ),
# )
# )
@@ -54,39 +78,58 @@
## http://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rai...
##
#$HTTP["host"] == "rails2.example.com" {
-# $HTTP["url"] =~ "^/someapp1"
-# server.document-root = server_root + "/rails/someapp2/public"
+# $HTTP["url"] =~ "^/someapp1" {
+# server.document-root = server_root + "/rails/someapp1/public"
# server.error-handler-404 = "/dispatch.fcgi"
# fastcgi.server = ( ".fcgi" =>
# ("someapp1" =>
-# ( "socket" => home_dir + "/someapp2-fcgi.socket",
-# "bin-path" => server_root + "/rails/someapp2/public/dispatch.fcgi",
+# ( "socket" => socket_dir + "/someapp1-fcgi.socket",
+# "bin-path" => server_root + "/rails/someapp1/public/dispatch.fcgi",
# "bin-environment" => (
# "RAILS_ENV" => "production",
-# "TMP" => home_dir + "/rails/someapp2"
+# "TMP" => home_dir + "/rails/someapp1",
# ),
# "strip-request-uri" => "/someapp1/"
# )
# )
# )
# }
-# $HTTP["url"] =~ "^/someapp2"
+#
+# $HTTP["url"] =~ "^/someapp2" {
# server.document-root = server_root + "/rails/someapp2/public"
# server.error-handler-404 = "/dispatch.fcgi"
# fastcgi.server = ( ".fcgi" =>
# ("someapp2" =>
-# ( "socket" => home_dir + "/someapp2-fcgi.socket",
+# ( "socket" => socket_dir + "/someapp2-fcgi.socket",
# "bin-path" => server_root + "/rails/someapp2/public/dispatch.fcgi",
# "bin-environment" => (
# "RAILS_ENV" => "production",
-# "TMP" => home_dir + "/rails/someapp2"
+# "TMP" => home_dir + "/rails/someapp2",
# ),
-# "strip-request-uri" => "/someapp1/"
+# "strip-request-uri" => "/someapp2/"
# )
# )
# )
# }
#}
+## chrooted webserver + external PHP
+##
+## $ spawn-fcgi -f /usr/bin/php-cgi -p 2000 -a 127.0.0.1 -C 8
+##
+## webserver chrooted to /srv/www/
+## php running outside the chroot
+#
+#fastcgi.server = (
+# ".php" => ((
+# "host" => "127.0.0.1",
+# "port" => "2000",
+# "docroot" => "/srv/www/servers/www.example.org/htdocs/"
+# )))
+#
+#server.chroot = "/srv/www"
+#server.document-root = "/servers/wwww.example.org/htdocs/"
+#
+
##
#######################################################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/geoip.conf new/config/conf.d/geoip.conf
--- old/config/conf.d/geoip.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/config/conf.d/geoip.conf 2006-11-29 23:55:32.000000000 +0100
@@ -0,0 +1,26 @@
+#######################################################################
+##
+## GeoIP Module
+## ---------------
+##
+## mod_geoip is a module for fast ip/location lookups. It uses MaxMind
+## GeoIP / GeoCity databases. If the ip was found in the database the
+## module sets the appropriate environments variables to the request,
+## thus making other modules/fcgi be informed.
+##
+server.modules += ( "mod_geoip" )
+
+##
+## mod_geoip will determine the database type automatically so if you
+## enter GeoCity databse path it will load GeoCity Env.
+##
+#geoip.db-filename = "/path/to/GeoCityLite.dat"
+
+##
+## If enabled, mod_geoip will load the database binary file to memory
+## for very fast lookups. The only penalty is memory usage.
+##
+#geoip.memory-cache = "disable"
+
+##
+#######################################################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/magnet.conf new/config/conf.d/magnet.conf
--- old/config/conf.d/magnet.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/config/conf.d/magnet.conf 2006-10-15 10:57:26.000000000 +0200
@@ -0,0 +1,22 @@
+#######################################################################
+##
+## Magnet Module
+## ---------------
+##
+## see http://trac.lighttpd.net/trac/wiki/Docs%3AModMagnet
+##
+server.modules += ( "mod_magnet" )
+
+##
+##
+##
+#magnet.attract-raw-url-to = ( )
+
+##
+## as an example for that see the mod_magnet docs and
+## http://pixel.global-banlist.de./
+##
+#magnet.attract-physical-path-to = ( conf_dir + "/cleanurl.lua" )
+
+##
+#######################################################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/mime.conf new/config/conf.d/mime.conf
--- old/config/conf.d/mime.conf 2006-03-06 01:28:47.000000000 +0100
+++ new/config/conf.d/mime.conf 2007-04-19 19:58:35.000000000 +0200
@@ -52,6 +52,7 @@
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
+ ".spec" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
@@ -64,7 +65,10 @@
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
- ".tar.bz2" => "application/x-bzip-compressed-tar"
+ ".tar.bz2" => "application/x-bzip-compressed-tar",
+ ".rpm" => "application/x-rpm",
+ # make the default mime type application/octet-stream.
+ "" => "application/octet-stream",
)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/proxy.conf new/config/conf.d/proxy.conf
--- old/config/conf.d/proxy.conf 2006-03-06 01:30:22.000000000 +0100
+++ new/config/conf.d/proxy.conf 2006-07-18 02:51:34.000000000 +0200
@@ -17,19 +17,19 @@
##
## might be one of 'hash', 'round-robin' or 'fair' (default).
##
-proxy.balance = "fair"
+#proxy.balance = "fair"
##
## Handle all jsp requests via 192.168.0.101
##
-proxy.server = ( ".jsp" =>
- ( "tomcat" =>
- (
- "host" => "192.168.0.101",
- "port" => 80
- )
- )
- )
+#proxy.server = ( ".jsp" =>
+# ( "tomcat" =>
+# (
+# "host" => "192.168.0.101",
+# "port" => 80
+# )
+# )
+# )
##
#######################################################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/scgi.conf new/config/conf.d/scgi.conf
--- old/config/conf.d/scgi.conf 2006-03-06 01:14:14.000000000 +0100
+++ new/config/conf.d/scgi.conf 2006-04-06 03:48:18.000000000 +0200
@@ -17,11 +17,11 @@
# server.error-handler-404 = "/dispatch.fcgi"
# scgi.server = ( ".scgi" =>
# ("scgi-someapp" =>
-# ( "socket" => home_dir + "/someapp-scgi.socket",
+# ( "socket" => socket_dir + "/someapp-scgi.socket",
# "bin-path" => server_root + "/rails/someapp/public/dispatch.scgi",
# "bin-environment" => (
# "RAILS_ENV" => "production",
-# "TMP" => home_dir + "/rails/someapp"
+# "TMP" => home_dir + "/rails/someapp",
# ),
# )
# )
@@ -41,7 +41,7 @@
# (
# "host" => "127.0.0.1",
# "port" => 9998,
-# "check-local" => "disable"
+# "check-local" => "disable",
# )
# )
# )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/simple_vhost.conf new/config/conf.d/simple_vhost.conf
--- old/config/conf.d/simple_vhost.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/config/conf.d/simple_vhost.conf 2006-07-26 03:30:23.000000000 +0200
@@ -0,0 +1,28 @@
+#######################################################################
+##
+## Simple Virtual hosting
+## ------------------------
+##
+## http://www.lighttpd.net/documentation/simple-vhost.html
+##
+server.modules += ( "mod_simple_vhost" )
+
+## If you want name-based virtual hosting add the next three settings and load
+## mod_simple_vhost
+##
+## document-root =
+## virtual-server-root + virtual-server-default-host + virtual-server-docroot
+## or
+## virtual-server-root + http-host + virtual-server-docroot
+##
+simple-vhost.server-root = vhosts_dir + "/"
+simple-vhost.default-host = "default.example.com"
+simple-vhost.document-root = "/htdocs/"
+
+##
+## Print some errors for finding the document-root
+##
+#simple-vhost.debug = "enable"
+
+##
+#######################################################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/simplev_host.conf new/config/conf.d/simplev_host.conf
--- old/config/conf.d/simplev_host.conf 2006-03-06 01:31:15.000000000 +0100
+++ new/config/conf.d/simplev_host.conf 1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-#######################################################################
-##
-## Simple Virtual hosting
-## ------------------------
-##
-## http://www.lighttpd.net/documentation/simple-vhost.html
-##
-server.modules += ( "mod_simple_vhost" )
-
-## If you want name-based virtual hosting add the next three settings and load
-## mod_simple_vhost
-##
-## document-root =
-## virtual-server-root + virtual-server-default-host + virtual-server-docroot
-## or
-## virtual-server-root + http-host + virtual-server-docroot
-##
-simple-vhost.server-root = server_root + "/vhosts/"
-simple-vhost.default-host = "default.example.com"
-simple-vhost.document-root = "/htdocs/"
-
-##
-#######################################################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/userdir.conf new/config/conf.d/userdir.conf
--- old/config/conf.d/userdir.conf 2006-03-06 01:14:14.000000000 +0100
+++ new/config/conf.d/userdir.conf 2006-04-06 01:12:47.000000000 +0200
@@ -30,7 +30,7 @@
## if set, only users from this list may use the feature
## Default: empty (all users may use it)
##
-#userdir.include-user = ()
+#userdir.include-user = ("user1", "user2")
##
#######################################################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/conf.d/webdav.conf new/config/conf.d/webdav.conf
--- old/config/conf.d/webdav.conf 2006-03-06 01:33:26.000000000 +0100
+++ new/config/conf.d/webdav.conf 2006-04-06 01:10:58.000000000 +0200
@@ -27,7 +27,7 @@
##
##
##
- webdav.sqlite-db-name = home_dir + "webdav.db"
+ webdav.sqlite-db-name = home_dir + "/webdav.db"
}
##
#######################################################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/lighttpd.conf new/config/lighttpd.conf
--- old/config/lighttpd.conf 2006-03-06 21:25:49.000000000 +0100
+++ new/config/lighttpd.conf 2006-11-07 22:17:40.000000000 +0100
@@ -8,6 +8,72 @@
#######################################################################
##
+## Some Variable definition which will make chrooting easier.
+##
+## if you add a variable here. Add the corresponding variable in the
+## chroot example aswell.
+##
+var.log_root = "/var/log/lighttpd"
+var.server_root = "/srv/www"
+var.state_dir = "/var/run"
+var.home_dir = "/var/lib/lighttpd"
+var.conf_dir = "/etc/lighttpd"
+
+##
+## run the server chrooted.
+##
+## This requires root permissions during startup.
+##
+## If you run Chrooted set the the variables to directories relative to
+## the chroot dir.
+##
+## example chroot configuration:
+##
+#var.log_root = "/logs"
+#var.server_root = "/"
+#var.state_dir = "/run"
+#var.home_dir = "/lib/lighttpd"
+#var.vhosts_dir = "/vhosts"
+#var.conf_dir = "/etc"
+#
+#server.chroot = "/srv/www"
+
+##
+## Some additional variables to make the configuration easier
+##
+
+##
+## Base directory for all virtual hosts
+##
+## used in:
+## conf.d/evhost.conf
+## conf.d/simple_vhost.conf
+## vhosts.d/vhosts.template
+##
+var.vhosts_dir = server_root + "/vhosts"
+
+##
+## Cache for mod_compress
+##
+## used in:
+## conf.d/compress.conf
+##
+var.cache_dir = "/var/cache/lighttpd"
+
+##
+## Base directory for sockets.
+##
+## used in:
+## conf.d/fastcgi.conf
+## conf.d/scgi.conf
+##
+var.socket_dir = home_dir + "/sockets"
+
+##
+#######################################################################
+
+#######################################################################
+##
## Load the modules.
include "modules.conf"
@@ -39,36 +105,6 @@
server.groupname = "lighttpd"
##
-## run the server chrooted.
-##
-## This requires root permissions during startup.
-##
-## Some Variable definition which will make chrooting easier.
-##
-## if you add a variable here. Add the corresponding variable in the
-## chroot example aswell.
-##
-var.log_root = "/var/log/lighttpd/"
-var.server_root = "/srv/www/"
-var.state_dir = "/var/run/"
-var.home_dir = "/var/lib/lighttpd/"
-var.cache_dir = home_dir + "cache/compress/"
-var.vhosts_dir = server_root + "vhosts/"
-##
-## If you run Chrooted set the the variables to directories relative to
-## the chroot dir.
-##
-## example chroot configuration:
-##
-#var.log_root = "/logs/"
-#var.server_root = "/htdocs/"
-#var.state_dir = "/run/"
-#var.home_dir = "/lib/lighttpd/"
-#var.cache_dir = home_dir + "/cache/compress/"
-#var.vhosts_dir = "/vhosts/"
-#server.chroot = "/srv/www/"
-
-##
## enable core files.
##
#server.core-files = "disable"
@@ -76,17 +112,19 @@
##
## Document root
##
-server.document-root = server_root + "htdocs/"
+server.document-root = server_root + "/htdocs"
##
## The value for the "Server:" response field.
##
-server.tag = "lighttpd/1.4.10 (SUSE Linux)"
+## It would be nice to keep it at "lighttpd".
+##
+#server.tag = "lighttpd"
##
## store a pid file
##
-server.pid-file = state_dir + "lighttpd.pid"
+server.pid-file = state_dir + "/lighttpd.pid"
##
#######################################################################
@@ -100,7 +138,7 @@
##
## Path to the error log file
##
-server.errorlog = log_root + "error.log"
+server.errorlog = log_root + "/error.log"
##
## If you want to log to syslog you have to unset the
@@ -163,6 +201,9 @@
## Changing this setting requires root permissions on startup. see
## server.username/server.groupname.
##
+## By default lighttpd would not change the operation system default.
+## But setting it to 2048 is a better default for busy servers.
+##
server.max-fds = 2048
##
@@ -178,10 +219,10 @@
##
## Fine tuning for the request handling
##
-## max-connections == max-fdS/2 (maybe /3)
+## max-connections == max-fds/2 (maybe /3)
## means the other file handles are used for fastcgi/files
##
-#server.max-connections = 1024
+server.max-connections = 1024
##
## How many seconds to keep a keep-alive connection open,
@@ -254,7 +295,7 @@
## index-file.names = ( "index.php", "index.rb", "index.html",
## "index.htm", "default.htm" )
##
-index-file.names = (
+index-file.names += (
"index.xhtml", "index.html", "index.htm", "default.htm", "index.php"
)
@@ -380,6 +421,6 @@
## custom includes like vhosts.
##
#include "conf.d/config.conf"
-#include_shell "cat vhosts.d/*.conf"
+#include_shell "cat /etc/lighttpd/vhosts.d/*.conf"
##
#######################################################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/modules.conf new/config/modules.conf
--- old/config/modules.conf 2006-03-06 01:14:14.000000000 +0100
+++ new/config/modules.conf 2006-10-15 10:47:33.000000000 +0200
@@ -19,7 +19,7 @@
##
## NOTE: the order of modules is important.
##
-## - mod_accesslog -> conf.d/access.log
+## - mod_accesslog -> conf.d/access_log.conf
## - mod_compress -> conf.d/compress.conf
## - mod_status -> conf.d/status.conf
## - mod_webdav -> conf.d/webdav.conf
@@ -28,7 +28,7 @@
## - mod_simple_vhost -> conf.d/simple_vhost.conf
## - mod_mysql_vhost -> conf.d/mysql_vhost.conf
## - mod_trigger_b4_dl -> conf.d/trigger_b4_dl.conf
-## - mod_userdir -> conf.d/userdir.conf
+## - mod_userdir -> conf.d/userdir.conf
## - mod_rrdtool -> conf.d/rrdtool.conf
## - mod_ssi -> conf.d/ssi.conf
## - mod_cgi -> conf.d/cgi.conf
@@ -59,6 +59,11 @@
##
##
+## mod_ssi
+##
+#include "conf.d/ssi.conf"
+
+##
## mod_status
##
#include "conf.d/status.conf"
@@ -79,6 +84,11 @@
#include "conf.d/userdir.conf"
##
+## mod_magnet
+##
+#include "conf.d/magnet.conf"
+
+##
## mod_cml
##
#include "conf.d/cml.conf"
@@ -117,7 +127,7 @@
#include "conf.d/scgi.conf"
##
-## FastCGI (mod_fastcgi)
+## FastCGI (mod_fastcgi)
##
#include "conf.d/fastcgi.conf"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/config/vhosts.d/vhosts.template new/config/vhosts.d/vhosts.template
--- old/config/vhosts.d/vhosts.template 2006-03-06 01:35:46.000000000 +0100
+++ new/config/vhosts.d/vhosts.template 2006-07-18 02:47:01.000000000 +0200
@@ -13,7 +13,7 @@
##
include "conf.d/trigger_b4_dl.conf"
- server.document-root = vhosts_dir + "example.com/download/htdocs"
+ server.document-root = vhosts_dir + "/example.com/download/htdocs"
##
## use a seperate access log file
## At the moment you cant have different error log files.
@@ -25,8 +25,8 @@
server.name = "localhost"
ssl.pemfile = "/etc/ssl/private/lighttpd-localhost.pem"
ssl.engine = "enable"
-
- server.document-root = "/srv/www/vhosts/ssl-localhost/pages/"
+
+ server.document-root = vhosts_dir + "/ssl-localhost/pages/"
}
##
++++++ lighttpd-1.4.13_geoip.patch ++++++
Index: src/Makefile.am
===================================================================
--- src/Makefile.am.orig
+++ src/Makefile.am
@@ -234,6 +234,10 @@ mod_accesslog_la_SOURCES = mod_accesslog
mod_accesslog_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_accesslog_la_LIBADD = $(common_libadd)
+lib_LTLIBRARIES += mod_geoip.la
+mod_geoip_la_SOURCES = mod_geoip.c
+mod_geoip_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
+mod_geoip_la_LIBADD = $(common_libadd) -lGeoIP
hdr = server.h buffer.h network.h log.h keyvalue.h \
response.h request.h fastcgi.h chunk.h \
Index: src/mod_geoip.c
===================================================================
--- /dev/null
+++ src/mod_geoip.c
@@ -0,0 +1,417 @@
+#include
+#include
+
+#include
+#include
+#include
+
+#include "base.h"
+#include "log.h"
+#include "buffer.h"
+
+#include "plugin.h"
+#include "inet_ntop_cache.h"
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/**
+ *
+ * $mod_geoip.c (v2.0) (13.09.2006 00:29:11)
+ *
+ * Name:
+ * mod_geoip.c
+ *
+ * Description:
+ * GeoIP module (plugin) for lighttpd.
+ * the module loads a geoip database of type "country" or "city" and
+ * sets new ENV vars based on ip record lookups.
+ *
+ * country db env's:
+ * GEOIP_COUNTRY_CODE
+ * GEOIP_COUNTRY_CODE3
+ * GEOIP_COUNTRY_NAME
+ *
+ * city db env's:
+ * GEOIP_COUNTRY_CODE
+ * GEOIP_COUNTRY_CODE3
+ * GEOIP_COUNTRY_NAME
+ * GEOIP_CITY_NAME
+ * GEOIP_CITY_POSTAL_CODE
+ * GEOIP_CITY_LATITUDE
+ * GEOIP_CITY_LONG_LATITUDE
+ * GEOIP_CITY_DMA_CODE
+ * GEOIP_CITY_AREA_CODE
+ *
+ * Usage (configuration options):
+ * geoip.db-filename = <path to the geoip or geocity database>
+ * geoip.memory-cache = : default disabled
+ * if enabled, mod_geoip will load the database binary file to
+ * memory for very fast lookups. the only penalty is memory usage.
+ *
+ * Author:
+ * Ami E. Bizamcher (amix)
+ * duke.amix@gmail.com
+ *
+ * Note:
+ * GeoIP Library and API must be installed!
+ */
+
+
+/* plugin config for all request/connections */
+
+typedef struct {
+ unsigned short mem_cache;
+ buffer *db_name;
+ GeoIP *gi;
+} plugin_config;
+
+typedef struct {
+ PLUGIN_DATA;
+
+ plugin_config **config_storage;
+
+ plugin_config conf;
+} plugin_data;
+
+/* init the plugin data */
+INIT_FUNC(mod_geoip_init) {
+ plugin_data *p;
+
+ p = calloc(1, sizeof(*p));
+
+ return p;
+}
+
+/* detroy the plugin data */
+FREE_FUNC(mod_geoip_free) {
+ plugin_data *p = p_d;
+
+ UNUSED(srv);
+
+ if (!p) return HANDLER_GO_ON;
+
+ if (p->config_storage) {
+ size_t i;
+
+ for (i = 0; i < srv->config_context->used; i++) {
+ plugin_config *s = p->config_storage[i];
+
+ if (!s) continue;
+
+ buffer_free(s->db_name);
+
+ /* clean up */
+ GeoIP_delete(s->gi);
+
+ free(s);
+ }
+ free(p->config_storage);
+ }
+
+ free(p);
+
+ return HANDLER_GO_ON;
+}
+
+/* handle plugin config and check values */
+
+SETDEFAULTS_FUNC(mod_geoip_set_defaults) {
+ plugin_data *p = p_d;
+ size_t i = 0;
+
+ config_values_t cv[] = {
+ { "geoip.db-filename", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION }, /* 0 */
+ { "geoip.memory-cache", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 1 */
+ { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
+ };
+
+ if (!p) return HANDLER_ERROR;
+
+ p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *));
+
+ for (i = 0; i < srv->config_context->used; i++) {
+ plugin_config *s;
+ int mode;
+
+ s = calloc(1, sizeof(plugin_config));
+
+ s->db_name = buffer_init();
+ s->mem_cache = 0; /* default: do not load db to cache */
+ s->gi = NULL;
+
+ cv[0].destination = s->db_name;
+ cv[1].destination = &(s->mem_cache);
+
+ p->config_storage[i] = s;
+
+ if (0 != config_insert_values_global(srv, ((data_config *)srv->config_context->data[i])->value, cv)) {
+ return HANDLER_ERROR;
+ }
+
+ mode = GEOIP_STANDARD | GEOIP_CHECK_CACHE;
+
+ /* country db filename is requeried! */
+ if (!buffer_is_empty(s->db_name)) {
+
+ /* let's start cooking */
+ if (s->mem_cache != 0)
+ mode = GEOIP_MEMORY_CACHE | GEOIP_CHECK_CACHE;
+
+ if (NULL == (s->gi = GeoIP_open(s->db_name->ptr, mode))) {
+ log_error_write(srv, __FILE__, __LINE__, "s",
+ "failed to open GeoIP database!!!");
+
+ return HANDLER_ERROR;
+ }
+
+ /* is the db supported ? */
+ if (s->gi->databaseType != GEOIP_COUNTRY_EDITION &&
+ s->gi->databaseType != GEOIP_CITY_EDITION_REV0 &&
+ s->gi->databaseType != GEOIP_CITY_EDITION_REV1) {
+ log_error_write(srv, __FILE__, __LINE__, "s",
+ "GeoIP database is of unsupported type!!!");
+ }
+ }
+ }
+
+ return HANDLER_GO_ON;
+}
+
+#define PATCH(x) \
+ p->conf.x = s->x;
+static int mod_geoip_patch_connection(server *srv, connection *con, plugin_data *p) {
+ size_t i, j;
+ plugin_config *s = p->config_storage[0];
+
+ PATCH(db_name);
+ PATCH(mem_cache);
+ PATCH(gi);
+
+ /* skip the first, the global context */
+ for (i = 1; i < srv->config_context->used; i++) {
+ data_config *dc = (data_config *)srv->config_context->data[i];
+ s = p->config_storage[i];
+
+ /* condition didn't match */
+ if (!config_check_cond(srv, con, dc)) continue;
+
+ /* merge config */
+ for (j = 0; j < dc->value->used; j++) {
+ data_unset *du = dc->value->data[j];
+
+ if (buffer_is_equal_string(du->key, CONST_STR_LEN("geoip.db-filename"))) {
+ PATCH(db_name);
+ }
+
+ if (buffer_is_equal_string(du->key, CONST_STR_LEN("geoip.memory-cache"))) {
+ PATCH(mem_cache);
+ }
+ }
+ }
+
+ return 0;
+}
+#undef PATCH
+
+URIHANDLER_FUNC(mod_geoip_subrequest) {
+ plugin_data *p = p_d;
+
+ mod_geoip_patch_connection(srv, con, p);
+
+ if (!buffer_is_empty(p->conf.db_name)) {
+ const char *remote_ip;
+ GeoIP *gi;
+ data_string *ds;
+ const char *returnedCountry;
+
+ remote_ip = inet_ntop_cache_get_ip(srv, &(con->dst_addr));
+
+ if (p->conf.gi->databaseType == GEOIP_COUNTRY_EDITION) {
+ /* get the country code 2 chars */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_COUNTRY_CODE"))) {
+ if (NULL != (returnedCountry = GeoIP_country_code_by_addr(p->conf.gi, remote_ip))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ buffer_copy_string(ds->key, "GEOIP_COUNTRY_CODE");
+ buffer_copy_string(ds->value, returnedCountry);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+ }
+
+ /* get the country code 3 chars */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_COUNTRY_CODE3"))) {
+ if (NULL != (returnedCountry = GeoIP_country_code3_by_addr(p->conf.gi, remote_ip))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ buffer_copy_string(ds->key, "GEOIP_COUNTRY_CODE3");
+ buffer_copy_string(ds->value, returnedCountry);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+ }
+
+ /* get the country name */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_COUNTRY_NAME"))) {
+ if (NULL != (returnedCountry = GeoIP_country_name_by_addr(p->conf.gi, remote_ip))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ buffer_copy_string(ds->key, "GEOIP_COUNTRY_NAME");
+ buffer_copy_string(ds->value, returnedCountry);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+ }
+
+ /* go on... */
+ return HANDLER_GO_ON;
+ }
+
+ /* if we are here, geo city is in use */
+ GeoIPRecord * gir;
+
+ if (NULL != (gir = GeoIP_record_by_addr(p->conf.gi, remote_ip))) {
+ /* get the country code 2 chars */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_COUNTRY_CODE"))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ buffer_copy_string(ds->key, "GEOIP_COUNTRY_CODE");
+ buffer_copy_string(ds->value, gir->country_code);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+
+ /* get the country code 3 chars */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_COUNTRY_CODE3"))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ buffer_copy_string(ds->key, "GEOIP_COUNTRY_CODE3");
+ buffer_copy_string(ds->value, gir->country_code3);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+
+ /* get the country name */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_COUNTRY_NAME"))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ buffer_copy_string(ds->key, "GEOIP_COUNTRY_NAME");
+ buffer_copy_string(ds->value, gir->country_name);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+
+ /* get the city region */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_CITY_REGION"))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ buffer_copy_string(ds->key, "GEOIP_CITY_REGION");
+ buffer_copy_string(ds->value, gir->region);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+
+ /* get the city */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_CITY_NAME"))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ buffer_copy_string(ds->key, "GEOIP_CITY_NAME");
+ buffer_copy_string(ds->value, gir->city);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+
+ /* get the postal code */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_CITY_POSTAL_CODE"))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ buffer_copy_string(ds->key, "GEOIP_CITY_POSTAL_CODE");
+ buffer_copy_string(ds->value, gir->postal_code);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+
+ /* get the latitude */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_CITY_LATITUDE"))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ char latitude[32];
+ sprintf(&latitude, "%f", gir->latitude);
+ buffer_copy_string(ds->key, "GEOIP_CITY_LATITUDE");
+ buffer_copy_string(ds->value, latitude);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+
+ /* get the long latitude */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_CITY_LONG_LATITUDE"))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ char long_latitude[32];
+ sprintf(&long_latitude, "%f", gir->longitude);
+ buffer_copy_string(ds->key, "GEOIP_CITY_LONG_LATITUDE");
+ buffer_copy_string(ds->value, long_latitude);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+
+ /* get the dma code */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_CITY_DMA_CODE"))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ char dc[5];
+ sprintf(&dc, "%i", gir->dma_code);
+ buffer_copy_string(ds->key, "GEOIP_CITY_DMA_CODE");
+ buffer_copy_string(ds->value, dc);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+
+ /* get the area code */
+ if (NULL == (ds = (data_string *)array_get_element(con->environment, "GEOIP_CITY_AREA_CODE"))) {
+ if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) {
+ ds = data_string_init();
+ }
+
+ char ac[5];
+ sprintf(&ac, "%i", gir->area_code);
+ buffer_copy_string(ds->key, "GEOIP_CITY_AREA_CODE");
+ buffer_copy_string(ds->value, ac);
+ array_insert_unique(con->environment, (data_unset *)ds);
+ }
+ }
+ }
+
+ /* keep walking... (johnnie walker style ;) */
+ return HANDLER_GO_ON;
+}
+
+/* this function is called at dlopen() time and inits the callbacks */
+
+int mod_geoip_plugin_init(plugin *p) {
+ p->version = LIGHTTPD_VERSION_ID;
+ p->name = buffer_init_string("geoip");
+
+ p->init = mod_geoip_init;
+ p->handle_subrequest_start = mod_geoip_subrequest;
+ p->set_defaults = mod_geoip_set_defaults;
+ p->cleanup = mod_geoip_free;
+
+ p->data = NULL;
+
+ return 0;
+}
Index: doc/geoip.txt
===================================================================
--- /dev/null
+++ doc/geoip.txt
@@ -0,0 +1,148 @@
+{{{
+#!rst
+==============================
+ip based geographic lookups...
+==============================
+
+-----------------
+Module: mod_geoip
+-----------------
+
+
+
+.. contents:: Table of Contents
+
+Requirements
+============
+
+:Packages: GeoIP C API & Library (http://www.maxmind.com/download/geoip/api/c/)
+
+Overview
+========
+
+mod_geoip is a module for fast ip/location lookups. It uses MaxMind GeoIP /
+GeoCity databases.
+If the ip was found in the database the module sets the appropriate
+environments variables to the request, thus making other modules/fcgi be
+informed.
+
+.. note::
+
+ Currently only country/city databases are supported because they have a free
+ version that i can test.
+
+Configuration Options
+========================
+
+mod_geoip uses two configuration options.
+
+1) geoip.db-filename = <path to the geoip or geocity database>
+2) geoip.memory-cache = : default disabled
+
+if enabled, mod_geoip will load the database binary file to
+memory for very fast lookups. the only penalty is memory usage.
+
+.. note::
+
+ mod_geoip will determine the database type automatically so if you enter
+ GeoCity databse path it will load GeoCity Env.
+
+Environment
+===========
+
+Every database sets it's own ENV:
+
+GeoIP (Country):
+----------------
+
+::
+
+ GEOIP_COUNTRY_CODE
+ GEOIP_COUNTRY_CODE3
+ GEOIP_COUNTRY_NAME
+
+GeoCity:
+--------
+
+::
+
+ GEOIP_COUNTRY_CODE
+ GEOIP_COUNTRY_CODE3
+ GEOIP_COUNTRY_NAME
+ GEOIP_CITY_NAME
+ GEOIP_CITY_POSTAL_CODE
+ GEOIP_CITY_LATITUDE
+ GEOIP_CITY_LONG_LATITUDE
+ GEOIP_CITY_DMA_CODE
+ GEOIP_CITY_AREA_CODE
+
+Examples
+========
+
+mod_geoip + php
+---------------
+
+when using fastcgi (not only php) you can access mod_geoip env and do as you
+please. this example just prints all mod_geoip envs to the client, html.
+
+Config-file ::
+
+ geoip.db-filename = "/your-geoip-db-path/GeoCityLite.dat"
+ geoip.memory-cache = "enable"
+
+index.php ::
+
+ <?php
+ $country_code = $_SERVER['GEOIP_COUNTRY_CODE'];
+ $country_code3 = $_SERVER['GEOIP_COUNTRY_CODE3'];
+ $country_name = $_SERVER['GEOIP_COUNTRY_NAME'];
+
+ $city_region = $_SERVER['GEOIP_CITY_REGION'];
+ $city_name = $_SERVER['GEOIP_CITY_NAME'];
+ $city_postal_code = $_SERVER['GEOIP_CITY_POSTAL_CODE'];
+ $city_latitude = $_SERVER['GEOIP_CITY_LATITUDE'];
+ $city_long_latitude = $_SERVER['GEOIP_CITY_LONG_LATITUDE'];
+ $city_dma_code = $_SERVER['GEOIP_CITY_DMA_CODE'];
+ $city_area_code = $_SERVER['GEOIP_CITY_AREA_CODE'];
+
+ echo "<html>\n<body>\n\t<br>\n";
+ echo 'Country Code: ' . $country_code . '<br>';
+ echo 'Country Code 3: ' . $country_code3 . '<br>';
+ echo 'Country Name: ' . $country_name . '<br>';
+ echo '<br>';
+ echo 'City Region: ' . $city_region . '<br>';
+ echo 'City Name: ' . $city_name . '<br>';
+ echo 'City Postal Code: ' . $city_postal_code . '<br>';
+ echo 'City Latitude: ' . $city_latitude . '<br>';
+ echo 'City Long Latitude: ' . $city_long_latitude . '<br>';
+ echo 'City DMA Code: ' . $city_dma_code . '<br>';
+ echo 'City Area Code: ' . $city_area_code . '<br>';
+ echo "</html>\n</body>";
+ ?>
+
+country based redirect
+----------------------
+
+Config-file ::
+
+ $HTTP["host"] =~ "www.domain.com" {
+ url.rewrite = ( "" => "/redirect.php")
+ }
+
+redirect.php ::
+
+ <?php
+ $country_code = $_SERVER['GEOIP_COUNTRY_CODE'];
+ header ('Location: http://' . $country_code . '.domain.com/');
+ ?>
+
+.. note::
+
+ Currently it is not possible to redirect based on mod_geoip directly in
+lighttpd config file. But i believe with the relase of lighttpd mod_magnet
+it would be. (mod_magnet will be available in lighttpd 1.4.12+)
+
+Downloads
+=========
+mod_geoip.c (http://trac.lighttpd.net/trac/attachment/wiki/Docs/ModGeoip/mod_geoip.c)
+}}}
++++++ lighttpd-1.4.13.tar.bz2 -> lighttpd-1.4.16.tar.bz2 ++++++
++++ 41168 lines of diff (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org