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