Summary: Reject invalid requests module for apache 1.3.x
Name: mod_require_host
Version: 2.3
Release: 1.n0i.1
License: Apache Software License
Group: System Environment/Daemons
URL: http://www.snert.com/Software/mod_require_host/
Source: http://www.snert.com/Software/download/mod_require_host203.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Prefix: %{_prefix}
BuildPreReq: zlib-devel, apache-devel, mm-devel
Requires: apache = %(rpm -q --qf "%{EPOCH}:%{VERSION}" apache)
Requires: mm >= %(rpm -q --qf "%{EPOCH}:%{VERSION}" mm)
%description
This module will reject requests that fail to provide either a Host: header
or an absolute URI as required by RFC 2616 section 5.1.2.
Intended to thwart the "slapper" worm.
%prep
%setup
%{__cat} <<'EOF' >mod_require_host.conf
RequireHostPolicy host proxy block-ip
# Allows the URL used to view the shared memory hash table,
# when the block-ip policy is used:
#
# http://www.snert.com/require-host-table
#
SetHandler require-host-table
EOF
%build
%{__make} %{?_smp_mflags} \
APXS="%{_sbindir}/apxs" \
SPOOLDIR=%{_localstatedir}/lib/%{name} \
build-dynamic
%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__install} -d -m0755 \
$RPM_BUILD_ROOT%{_libdir}/apache/ \
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/ \
$RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
%{__install} -m0755 %{name}.so $RPM_BUILD_ROOT%{_libdir}/apache/
%{__install} -m0644 %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root, 0755)
%doc *.txt *.TXT *html *.css Img/
%config(noreplace) %{_sysconfdir}/httpd/conf/%{name}.conf
%{_libdir}/apache/%{name}.so
%attr(0750,apache,apache) %dir %{_localstatedir}/lib/%{name}
%changelog
* Thu Jun 24 2004 Marius FERARU 0:2.3-1.n0i.1
- version 2.3
- Initial packaging