You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/07/24 23:53:38 UTC
[1/3] git commit: Removed build instructions,
and fixed the indented areas.
Updated Branches:
refs/heads/master fffd1a96c -> 4e55e5096
Removed build instructions, and fixed the indented areas.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/925e7b38
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/925e7b38
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/925e7b38
Branch: refs/heads/master
Commit: 925e7b38a75a54a1df5c1a53bb8c345602341506
Parents: fffd1a9
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed Jul 24 15:48:49 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Wed Jul 24 15:48:49 2013 -0600
----------------------------------------------------------------------
doc/plugins/geoip_acl.en.rst | 51 +++++++++++++--------------------------
1 file changed, 17 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/925e7b38/doc/plugins/geoip_acl.en.rst
----------------------------------------------------------------------
diff --git a/doc/plugins/geoip_acl.en.rst b/doc/plugins/geoip_acl.en.rst
index 774c146..a864706 100644
--- a/doc/plugins/geoip_acl.en.rst
+++ b/doc/plugins/geoip_acl.en.rst
@@ -21,19 +21,9 @@ GeoIP ACLs Plugin
This is a simple ATS plugin for denying (or allowing) requests based on
the source IP geo-location. Currently only the Maxmind APIs are
supported, but we'd be happy to other other (open) APIs if you let us
-know.
+know. This plugin comes with the standard distribution of Apache Traffic
+Server, and should be installed as part of the normal build process.
-Building
-========
-
-The build and installation requires a full installation of Apache
-Traffic Server v3.0.0 or later. In particular, the include files must be
-available, and the tsxs build script should be in the path (or modify
-the Makefile).
-
-::
- % gmake
- % sudo gmake install
Configuration
=============
@@ -42,9 +32,8 @@ Once installed, there are three primary use cases, which we will discuss
in details. Note that in all configurations, the first plugin parameter
must specify what the matches should be applied to. Currently, only one
rule set is supported, for Country ISO codes. This is specified with a
-parameter of
+parameter of ::
-::
@pparam=country
Future additions to this plugin could include other regions, such as
@@ -57,27 +46,23 @@ The three typical use cases are as follows:
paths should be filtered. For example, lets assume that
http://example.com/music is restricted to US customers only, and
everything else is world wide accessible. In remap.config, you would
- have something like
-
- ::
- map http://example.com/music http://music.example.com \
- @plugin=geoip_acl.so @pparam=country @pparam=allow @pparam=US
+ have something like ::
- map http://example.com http://other.example.com
+ map http://example.com/music http://music.example.com \
+ @plugin=geoip_acl.so @pparam=country @pparam=allow @pparam=US
+ map http://example.com http://other.example.com
2. If you can not partition the data with a path prefix, you can specify
a separate regex mapping filter. The remap.config file might then
- look like
+ look like ::
- ::
- map http://example.com http://music.example.com \
- @plugin=geoip_acl.so @pparam=country \
- @pparam=regex::/etc/music.regex
+ map http://example.com http://music.example.com \
+ @plugin=geoip_acl.so @pparam=country \
+ @pparam=regex::/etc/music.regex
where music.regex is a format with PCRE (perl compatible) regular
-expressions, and unique rules for match. E.g.
+expressions, and unique rules for match. E.g.::
-::
.*\.mp3 allow US
.*\.ogg deny US
@@ -89,19 +74,17 @@ use case.
remap.config configuration, which then applies for the cases where no
regular expressions matches at all. This would be useful to override
the default which is to allow all requests that don't match. For
- example
+ example ::
- ::
- map http://example.com http://music.example.com \
- @plugin=geoip_acl.so @pparam=country @pparam=allow @pparam= US
- @pparam=regex::/etc/music.regex
+ map http://example.com http://music.example.com \
+ @plugin=geoip_acl.so @pparam=country @pparam=allow @pparam= US
+ @pparam=regex::/etc/music.regex
This tells the plugin that in the situation where there is no matching
regular expression, only allow requests originating from the US.
-Finally, there's one additional parameter option that can be used:
+Finally, there's one additional parameter option that can be used ::
-::
@pparam=html::/some/path.html
This will override the default reponse body for the denied responses
[2/3] git commit: Fix the indented areas.
Posted by zw...@apache.org.
Fix the indented areas.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/98978843
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/98978843
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/98978843
Branch: refs/heads/master
Commit: 989788439cb5da2f4e0972b2a5ea622997d68e6b
Parents: 925e7b3
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed Jul 24 15:51:14 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Wed Jul 24 15:51:14 2013 -0600
----------------------------------------------------------------------
doc/plugins/header_filter.en.rst | 36 +++++++++++++----------------------
1 file changed, 13 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/98978843/doc/plugins/header_filter.en.rst
----------------------------------------------------------------------
diff --git a/doc/plugins/header_filter.en.rst b/doc/plugins/header_filter.en.rst
index 755a458..3885612 100644
--- a/doc/plugins/header_filter.en.rst
+++ b/doc/plugins/header_filter.en.rst
@@ -21,30 +21,26 @@ Header Filter Plugin
The ``header_filter`` is a simple plugin for filtering out headers from
requests (or responses). Typical configuration is done either with a
global configuration, in
-```plugin.config`` <../../configuration-files/plugin.config>`_:
+```plugin.config`` <../../configuration-files/plugin.config>`_::
-::
header_filter.so /usr/local/etc/hdr_filters.conf
Or, alternatively, in a
```per-remap`` <../../configuration-files/remap.config>`_ rule
-configuration
+configuration ::
-::
map http://a.com/ http://b.com @plugin=header_filter.so @pparam=hdr_filters.conf
Even if you don't have a global configuration, if your remap rules
schedules actions in hooks other than during remap, you must also add
the ``header_filter.so`` to the
```plugin.config`` <../../configuration-files/remap.config>`_ (see
-above), but without args:
+above), but without args::
-::
header_filter.so
-The configuration files looks like
+The configuration files looks like ::
-::
[READ_REQUEST_HDR]
X-From-Someone
Cookie
@@ -59,13 +55,13 @@ The configuration files looks like
X-Bar [Test* # Match the prefix string
X-Fum *Test] # Match the postfix string
+
Comments are prefixed with ``#``, and in most cases, the regular
expression matching is the best choice (very little overhead). The
pattern matches can also take an option '``!``\ ' to reverse the test.
The default action is to delete all headers that do (not) match the
-pattern. E.g.
+pattern. E.g.::
-::
[SEND_REQUEST_HDR]
X-Fie /test/
X-Foo ! /test/i
@@ -74,9 +70,8 @@ The final "``i``\ " qualifier (works on all pattern matches) forces the
match or comparison to be made case insensitive (just like in Perl).
It's also possible to replace or add headers, using the = and +
-operators. For example
+operators. For example ::
-::
[SEND_REQUEST_HDR]
Host =www.example.com=
X-Foo +ATS+
@@ -86,9 +81,8 @@ This will force the Host: header to have exactly one value,
the value ATS, but there could be more instances of the header from the
existing header in the request.
-Possible hooks are
+Possible hooks are ::
-::
READ_REQUEST_HDR
SEND_REQUEST_HDR
READ_RESPONSE_HDR
@@ -100,6 +94,7 @@ configure a remap rule to delete headers in a later hook (e.g. when
reading a response from the server). This is what actually makes the
plugin even remotely useful.
+
Examples
========
@@ -111,22 +106,19 @@ HTTPS. While not regulated standard, we can use the
``X-Forwarded-Proto`` header for this purpose.
In ```plugin.config`` <../../configuration-files/plugin.config>`_ we
-need to add:
+need to add::
-::
header_filter.so
Then, in ```remap.config`` <../../configuration-files/remap.config>`_ we
-can configure ``header_filter`` on a case by case basis:
+can configure ``header_filter`` on a case by case basis::
-::
map http://example.org http://172.16.17.42:8080
map https://example.org http://172.16.17.42:8080 @plugin=header_filter.so @pparam=/etc/trafficserver/x_fwd_proto.conf
The configuration that ties everything together is then
-``/etc/trafficserver/x_fwd_proto.config``, to which we add:
+``/etc/trafficserver/x_fwd_proto.config``, to which we add::
-::
[SEND_REQUEST_HDR]
X-Forwarded-Proto =https=
@@ -136,8 +128,6 @@ To activate this configuration, we need to restart Traffic Server with
In the backend servers we can now pick this up and do appropriately set
server variables that will be picked up by CGI programs for instance. In
the case of Apache httpd backend, this can be acomplished with
-```mod_setenvif`` <http://httpd.apache.org/docs/current/mod/mod_setenvif.html#setenvif>`_:
+```mod_setenvif`` <http://httpd.apache.org/docs/current/mod/mod_setenvif.html#setenvif>`_::
-::
SetEnvIf X-Forwarded-Proto https HTTPS=on SSL=on
-
[3/3] git commit: Updated indentation and installation instructions.
Posted by zw...@apache.org.
Updated indentation and installation instructions.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4e55e509
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4e55e509
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4e55e509
Branch: refs/heads/master
Commit: 4e55e50964e1589c1a629b8f15ac003e0cf23c32
Parents: 9897884
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed Jul 24 15:53:21 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Wed Jul 24 15:53:21 2013 -0600
----------------------------------------------------------------------
doc/plugins/gzip.en.rst | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4e55e509/doc/plugins/gzip.en.rst
----------------------------------------------------------------------
diff --git a/doc/plugins/gzip.en.rst b/doc/plugins/gzip.en.rst
index d601f0d..ca49913 100644
--- a/doc/plugins/gzip.en.rst
+++ b/doc/plugins/gzip.en.rst
@@ -20,20 +20,16 @@ gzip / deflate Plugin
This plugin gzips or deflates responses, whichever is applicable. It can
-compress origin respones as well as cached responses.
+compress origin respones as well as cached responses. The plugin is built
+and installed as part of the normal Apache Traffic Server installation
+process.
Installation
============
-First, run:
+Add the following line to
+```plugin.config`` <../../configuration-files/plugin.config>`_::
-::
- make && sudo make install
-
-Then, add the following line to
-```plugin.config`` <../../configuration-files/plugin.config>`_:
-
-::
gzip.so
In this case, the plugin will use the default behaviour:
@@ -47,9 +43,8 @@ In this case, the plugin will use the default behaviour:
Configuration
=============
-Alternatively, a configuration can also be specified:
+Alternatively, a configuration can also be specified::
-::
gzip.so <path-to-plugin>/sample.gzip.config
After modifying plugin.cofnig, restart traffic server (sudo
@@ -79,9 +74,8 @@ compressible content types.
``disallow``: Wildcard pattern for disabling compression on urls.
-Options can be set globally or on a per-site basis, as such:
+Options can be set globally or on a per-site basis, as such::
-::
# Set some global options first
cache true
enabled true
@@ -95,4 +89,3 @@ Options can be set globally or on a per-site basis, as such:
disallow /notthis/*.js
See example.gzip.config for example configurations.
-