dnion的remap.conf文件
#
# URL Remapping Config File
#
# Using remap.config allows you to accomplish two things:
#
# 1) Rewrite a URL (from the client) before sending it to the Origin Server.
# 2) Protect the proxy server, to only allow certain requests.
#
# With the default configurations, at least one remap rule is required. This
# can be relaxed with the following configuration in records.config:
#
# CONFIG proxy.config.url_remap.remap_required INT 0
#
# Be aware, doing so makes the proxy a generic, open-relay!
#
# The format is:
# <map_type> client-URL origin-server-URL <tag_value> <filtering>
#
# Where client-URL and origin-server-URL are both of the format
# <scheme>://<host>:<port>/<path_prefix>
#
# The <tag_value> directive is optional and can be different for different
# types of <map_type>. The <filtering arguments> are optional ACL-like
# arguments unique for each remap rule
#
# Six different types of mappings are possible:
# map
# map_with_referer
# map_with_recv_port
# reverse_map
# redirect
# redirect_temporary
#
# Each of these map types can be prefixed with the string 'regex_' to indicate
# that the rule will have regular expression strings. See the last part of
# this description for more information on regex support.
#
# The 'map' mapping is the most straightforward. Requests that match the
# client-URL are rewritten into the origin-server-URL. The user agent will see
# the page on the remapped URL, but will not be notified of the address
# change.
#
# The 'map_with_referer' is an extended version of 'map', which can be used to
# activate the so-called "deep linking protection" feature available in
# Apache Traffic Server.
#
# The 'map_with_recv_port' is exactly like 'map' except that it uses the port
# at which the request was received to perform the mapping instead of the port
# present in the request. When present, 'map_with_recv_port' mappings are
# checked first. If there is a match, then it is chosen without evaluating the
# "regular" forward mapping rules.
#
# The 'reverse_map' mapping is used to rewrite location headers sent by the
# origin server. The 'redirect' mapping creates a permanent redirect message
# and informs the browser of the URL change.
#
# The 'redirect_temporary' mapping acts in the same way but tells the browser
# that this redirect is only temporary. We need to map the URL in reverse
# proxy mode so that user agents know to contact Traffic Server and not
# attempt to contact the Origin Server directly.
#
# For example, you can set up a reverse proxy for www.example.com with the
# real content situated at server1.example.com with the rules:
#
# map http://www.example.com/ http://server1.example.com/
# reverse_map http://server1.example.com/ http://www.example.com/
#
# Or you could permanently redirect users trying to access www.oldserver.com
# to www.newserver.com with the following rule:
#
# redirect http://www.oldserver.com/ http://www.newserver.com
#
# If the redirect is only temporary, you want to only temporarily remap the
# URL. You could use the following rule to divert users away from a failed
# server:
#
# redirect_temporary http://broken.firm.com http://working.firm.com
#
# In order to use "deep linking protection" Traffic Server's feature, the
# 'map_with_referer' mapping scheme must be used. In general, the format of is
# the following:
#
# map_with_referer client-URL origin-server-URL redirect-URL regex1 [regex2 ...]
#
# 'redirect-URL' is a redirection URL specified according to RFC 2616 and can
# contain special formatting instructions for run-time modifications of the
# resulting redirection URL. All regexes Perl compatible regular expressions,
# which describes the content of the "Referer" header which must be
# verified. In case an actual request does not have "Referer" header or it
# does not match with referer regular expression, the HTTP request will be
# redirected to 'redirect-URL'.
#
# At least one regular expressions must be specified in order to activate
# 'deep linking protection'. There are limitations for the number of referer
# regular expression strings - 2048. In order to enable the 'deep linking
# protection' feature in Traffic Server, configure records.config with:
#
# CONFIG proxy.config.http.referer_filter INT 1
#
# In order to enable run-time formatting for redirect0URL, configure
#
# CONFIG proxy.config.http.referer_format_redirect INT 1
#
# When run-time formatting for redirect-URL was enabled the following format
# symbols can be used:
#
# %r - to substitute original "Referer" header string
# %f - to substitute client-URL from 'map_with_referer' record
# %t - to substitute origin-server-URL from 'map_with_referer' record
# %o - to substitute request URL to origin server, which was created a
# the result of a mapping operation
#
# Note: There is a special referer type "~*" that can be used in order to
# specify that the Referer header is optional in the request. If "~*" referer
# was used in map_with_referer mapping, only requests with Referer header will
# be verified for validity. If the "~" symbol was specified before referer
# regular expression, it means that the request with a matching referer header
# will be redirected to redirectURL. It can be used to create a so-called
# negative referer list. If "*" was used as a referer regular expression -
# all referers are allowed. Various combinations of "*" and "~" in a referer
# list can be used to create different filtering rules.
#
# Examples:
# map_with_referer http://y.foo.bar.com/x/yy/ http://foo.bar.com/x/yy/ http://games.bar.com/new_games .*\.bar\.com www.bar-friends.com
#
# Explanation: Referer header must be in the request, only ".*\.bar\.com"
# and "www.bar-friends.com" are allowed.
#
# map_with_referer http://y.foo.bar.com/x/yy/ http://foo.bar.com/x/yy/ http://games.bar.com/new_games * ~.*\.evil\.com
#
# Explanation: Referer header must be in the request but all referers are
# allowed except ".*\.evil\.com".
#
# map_with_referer http://y.foo.bar.com/x/yy/ http://foo.bar.com/x/yy/ http://games.bar.com/error ~* * ~.*\.evil\.com
#
# Explanation: Referer header is optional. However, if Referer header exists,
# only request from ".*\.evil\.com" will be redirected to redirect-URL.
#
# There are optional filtering arguments that can be specified at the end of the mapping definition line:
#
# @action=allow|deny
# @src_ip=IP-address
# @method=HTTP method string (CONNECT|DELETE|GET|HEAD|ICP_QUERY|OPTIONS|POST|PURGE|PUT|TRACE|PUSH)
# @plugin=<plugin_path>
# @pparam=<plugin_param>
#
# There is no limitation for the number of filtering arguments.
#
# Example:
# map http://foo.cow.com/ http://bar.cow.com @src_ip=10.72.118.51-10.72.118.62 @method=GET @method=DELETE @src_ip=192.168.0.1-192.168.0.254 @action=allow @method=PUT
#
# Traffic Server supports WebSockets but it must be enabled via remap. WebSocket upgrades are automatically
# detected when there exists a remap rule containing a ws:// scheme.
#
# Example:
# map ws://bar.com/ ws://foo.com/
#
# Explaination: When a request comes in with the appropriate upgrade headers, Traffic Server will use this
# remap rule in an attempt to establish and maintain a websocket connection.
#
# Named filters can be created and applied to blocks of mappings
# using the .definefilter, .activatefilter, and .deactivatefilter
# directives. Named filters must be defined using .definefilter
# before being used. Once defined, .activatefilter can used to
# activate a filter for all mappings that follow until deactivated
# with .deactivatefilter.
#
# Example:
# .definefilter disable_delete_purge @action=deny @method=delete @method=purge
# .definefilter internal_only @action=allow @src_ip=192.168.0.1-192.168.0.254 @src_ip=10.0.0.1-10.0.0.254
#
# .activatefilter disable_delete_purge
#
# map http://foo.example.com/ http://bar.example.com/
#
# .activatefilter internal_only
# map http://www.example.com/admin http://internal.example.com/admin
# .deactivatefilter internal_only
#
# map http://www.example.com/ http://internal.example.com/
#
#
# Regex support: Regular expressions can be specified in the rules with the
# following limitations:
#
# 1) Only the host field can have regexes - the scheme, port and other
# fields cannot.
# 2) The number of capturing sub-patterns is limited to 9;
# this means $0 through $9 can be used as substitution place holders ($0
# will be the entire input string)
# 3) The number of substitutions in the expansion string is limited to 10.
map http://192.168.128.236/cache/ http://{cache}
map http://192.168.128.236/crossdomain.xml http://api.hd.youku.com/crossdomain.xml
#大文件配置创建名为maps.reg的文件
map http://192.168.128.236 http://www.baidu.com @plugin=regex_remap.so @pparam=/usr/local/trafficserver/etc/trafficserver/maps.reg
regex_map http://(.*) http://$1
dnion的remap.conf文件的更多相关文章
- initrd image比lvm.conf文件舊導致RHCS切換服務unmount failed,reboot
在RHCS服務切換的時候,unmount盤的時候,發現會failed,並且直接導致reboot. 在message里看到這樣一段 [lvm] * initrd image needs to be ne ...
- VSFTPD全攻略(/etc/vsftpd/vsftpd.conf文件详解)
/etc/vsftpd/vsftpd.conf文件详解,分好类,方便大家查找与学习 #################匿名权限控制############### anonymous_enable=YE ...
- [Android][Audio] audio_policy.conf文件分析
不同的Android产品在音频的设计上通常是存在差异的,而这些差异可以同过Audio的配置文件audio_policy.conf来获得.在Android系统中音频配置文件存放路径有两处,存放地址可以从 ...
- 【转】/etc/grub.conf文件详解
转自:http://leejia.blog.51cto.com/4356849/788902 grub.conf是grub的主配置文件,通过这个配置文件,grub才能找到kernel,系统才能正常启动 ...
- RHEL-resolv.conf文件修改后重启被还原
修改resolve.conf文件之后,reboot或service restart network时,修改的内容被还原.关闭NetworkManager即可.# chkconfig |grep Net ...
- Apache conf文件配置个人总结
其实说到conf文件的配置,网上那必定是大堆大堆的,故今儿写着篇小博文,也只是做个总结,至于分享的价值吗,如果对屏幕前的你有用,我也很乐意啦. 首先,我们要找到Apache安装目录,我的是Ap ...
- 使用Apache + mod_jk + tomcat来实现tomcat集群的负载均衡出现的无法加载mod_jk.conf文件的问题
用Apache + mod_jk + tomcat来实现tomcat集群的负载均衡的 如果出现了问题,可以用cmd cd到Apache安装文件的bin下,运行httpd文件,错误信息就会打印出来. ...
- sphinx分域搜索【不】需要在conf文件中使用sql_field_string
请看sql_field_string的文档说明: # combined field plus attribute declaration (from a single column) # stores ...
- php解析ini,conf文件
/** * 解析conf文件,类似ini文件 * @param string $strFileName 文件名 * @param boolean $boolParseVal 解析值为数组,多 * @a ...
随机推荐
- 高通平台的bootloader过程【转】
====================基本知识=======================LK是(L)ittle (K)ernel的缩写.高通平台android普遍采用LK作为其bootloade ...
- 基础Linux命令总结
简单命令Linux ls 列出当前文件目录下的文件(只显示文件名) pwd 显示当前操作的路径 cd 跳转路径 ls -a 可以把隐藏的文件显示出来 ,另外,创建隐藏文件的命令是 touch.123. ...
- bzoj:1685 [Usaco2005 Oct]Allowance 津贴
Description As a reward for record milk production, Farmer John has decided to start paying Bessie t ...
- [51nod1329]路径游戏
Snuke与Sothe两个人在玩一个游戏.游戏在一个2*N的网格中进行(2行N列),这个网格中的2N个格子不是黑色就是白色.定义,一条有效路径是指一个完全由白色格子构成的序列,这个序列的第一个网格元素 ...
- Slim Span(Kruskal)
题目链接:http://poj.org/problem?id=3522 Slim Span Time Limit: 5000MS Memory Limit: 65536K Total Subm ...
- c语言实现封装、继承和多态
1. 概述 C语言是一种面向过程的程序设计语言,而C++是在C语言基础上衍生来了的面向对象的语言,实际上,很多C++实现的底层是用C语言实现的,如在Visual C++中的Interface其实就是 ...
- 算法-java代码实现归并排序
归并排序 对于一个int数组,请编写一个归并排序算法,对数组元素排序. 给定一个int数组A及数组的大小n,请返回排序后的数组. 测试样例: [1,2,3,5,2,3],6 [1,2,2,3,3,5] ...
- 一篇文章让你深透理解cookie和session,附带分布式WEB系统redis共享session方案
cookie和session有什么区别?这是一个很基础的知识点,大家可能都知道一个大概:cookie是存在客户端的,session是存储在服务端,cookie和session用来验证识别用户的登录状态 ...
- RPC架构简单理解
RPC(Remote Promote Call) 一种进程间通信方式.允许像调用本地服务一样调用远程服务. RPC框架的主要目标就是让远程服务调用更简单.透明.RPC框架负责屏蔽底层的传输方式(TCP ...
- EL表达式得不到后台传过来的值
两种jsp获得action传过来的值 第一种: <s:iterator value="#pagination.datas" var="supplier" ...