]> git.pld-linux.org Git - packages/apache-mod_extract_forwarded.git/blame - apache-mod_extract_forwarded.spec
- added cross-conflicts
[packages/apache-mod_extract_forwarded.git] / apache-mod_extract_forwarded.spec
CommitLineData
99bd6926
PG
1%define mod_name extract_forwarded
2%define apxs /usr/sbin/apxs
3Summary: Apache module: Extract X-Forwarded-For header
4Name: apache-mod_%{mod_name}
5Version: 2.0.2
6Release: 1
7License: Apache
8Group: Networking/Daemons/HTTP
9Source0: http://www.openinfo.co.uk/apache/%{mod_name}-%{version}.tar.gz
10# Source0-md5: d7aeb59fa81cbe74c485c33873ea1c65
11Source1: %{name}.conf
12URL: http://www.openinfo.co.uk/apache/index.html
13BuildRequires: %{apxs}
14BuildRequires: apache-devel >= 2.0.40
15BuildRequires: rpmbuild(macros) >= 1.268
16Requires: apache(modules-api) = %apache_modules_api
743e5f9e 17Requires: apache(mod_proxy)
b1fd7a84
PG
18Conflicts: apache(mod_rpaf)
19Provides: apache(mod_extract_forwarded)
99bd6926
PG
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
23%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
24
25%description
26mod_extract_forwarded is designed to transparently (to other Apache modules)
27modify the information about the connection over which an HTTP request is
28received when that connection is not directly from a requesting client to
29the Apache server but is instead via one or more intervening proxy servers.
30
31Operation relies on the X-Forwarded-For header, inserted by proxy servers.
32This is a non-RFC-standard request header which was introduced by the Squid
33caching proxy server's developers and which is now also supported, for
34reverse proxy server operation, by Apache 2. If the intervening proxy
35servers doesn't add such headers, we can't do anything about it. It is
36worth noting that a normally configured Squid proxy server will add to the
37X-Forwarded-For. However, when used as a proxy server, Apache prior to
38version 2 does not add X-Forwarded-For headers unless the third party
39mod_proxy_add_forward module has been added to it. This can leave
40potentially important gaps in the information recorded in X-Forwarded-For
41header.
42
43%prep
44%setup -q -n %{mod_name}
45
46%build
47%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la
48
49%install
50rm -rf $RPM_BUILD_ROOT
51install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
52install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf
53install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
54
55%clean
56rm -rf $RPM_BUILD_ROOT
57
58%post
59%service -q httpd restart
60
61%postun
62if [ "$1" = "0" ]; then
63 %service -q httpd restart
64fi
65
66%files
67%defattr(644,root,root,755)
68%doc README INSTALL
69%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
70%attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.081041 seconds and 4 git commands to generate.