1<?xml version="1.0" encoding="ISO-8859-1"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!-- 4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 5 This file is generated from xml source: DO NOT EDIT 6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 7 --> 8<title>mod_proxy_express - Apache HTTP Server</title> 9<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> 10<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> 11<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" /> 12<script src="/style/scripts/prettify.min.js" type="text/javascript"> 13</script> 14 15<link href="/images/favicon.ico" rel="shortcut icon" /></head> 16<body> 17<div id="page-header"> 18<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p> 19<p class="apache">Apache HTTP Server Version 2.4</p> 20<img alt="" src="/images/feather.gif" /></div> 21<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div> 22<div id="path"> 23<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.4</a> > <a href="./">Modules</a></div> 24<div id="page-content"> 25<div id="preamble"><h1>Apache Module mod_proxy_express</h1> 26<div class="toplang"> 27<p><span>Available Languages: </span><a href="/en/mod/mod_proxy_express.html" title="English"> en </a> | 28<a href="/fr/mod/mod_proxy_express.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a></p> 29</div> 30<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Dynamic mass reverse proxy extension for 31<code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code></td></tr> 32<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr> 33<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>proxy_express_module</td></tr> 34<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_proxy_express.c</td></tr></table> 35<h3>Summary</h3> 36 37 <p>This module creates dynamically configured mass reverse 38 proxies, by mapping the Host: header of the HTTP request to 39 a server name and backend URL stored in a DBM file. 40 This allows for easy use of a huge number of reverse proxies 41 with no configuration changes. It is much less feature-full 42 than <code class="module"><a href="/mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code>, which also provides 43 dynamic growth, but is intended to handle much, much 44 larger numbers of backends. It is ideally suited as a 45 front-end HTTP switch.</p> 46 47 <p>This module <em>requires</em> the service of <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>.</p> 48 49 <div class="warning"><h3>Warning</h3> 50 <p>Do not enable proxying until you have <a href="mod_proxy.html#access">secured your server</a>. Open proxy 51 servers are dangerous both to your network and to the Internet at 52 large.</p> 53 </div> 54 55<div class="note"><h3>Limitations</h3> 56 <ul> 57 <li>This module is not intended to replace the dynamic capability of 58 <code class="module"><a href="/mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code>. Instead, it is intended to be mostly 59 a lightweight and fast alternative to using <code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code> 60 with <code class="directive">RewriteMap</code> and the <code>[P]</code> flag 61 for mapped reverse proxying. 62 </li> 63 <li>It does not support regex or pattern matching at all. 64 </li> 65 <li>It emulates: 66 <div class="example"><p><code> 67 ProxyPass / backend.server:port<br /> 68 ProxyPassReverse / backend.server:port<br /> 69 </code></p></div> 70 That is, the entire URL is appended to the mapped backend 71 URL. This is in keeping with the intent of being a simple 72 but fast reverse proxy switch. 73 </li> 74 </ul> 75</div> 76 77</div> 78<div id="quickview"><h3 class="directives">Directives</h3> 79<ul id="toc"> 80<li><img alt="" src="/images/down.gif" /> <a href="#proxyexpressdbmfile">ProxyExpressDBMFile</a></li> 81<li><img alt="" src="/images/down.gif" /> <a href="#proxyexpressdbmtype">ProxyExpressDBMType</a></li> 82<li><img alt="" src="/images/down.gif" /> <a href="#proxyexpressenable">ProxyExpressEnable</a></li> 83</ul> 84<h3>See also</h3> 85<ul class="seealso"> 86<li><code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code></li> 87</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> 88 89<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 90<div class="directive-section"><h2><a name="ProxyExpressDBMFile" id="ProxyExpressDBMFile">ProxyExpressDBMFile</a> <a name="proxyexpressdbmfile" id="proxyexpressdbmfile">Directive</a></h2> 91<table class="directive"> 92<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Pathname to DBM file.</td></tr> 93<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyExpressDBMFile <pathname></code></td></tr> 94<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>None</code></td></tr> 95<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> 96<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr> 97<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy_express</td></tr> 98<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.13 and later</td></tr> 99</table> 100 <p>The <code class="directive">ProxyExpressDBMFile</code> directive 101 points to the location of the Express map DBM file. This 102 file serves to map the incoming server name, obtained from 103 the Host: header, to a backend URL.</p> 104 105 <div class="note"><h3>Note</h3> 106 <p>The file is constructed from a plain text file format using 107 the <code><a href="/programs/httxt2dbm.html">httxt2dbm</a></code> 108 utility.</p> 109 110 <div class="example"><h3>ProxyExpress map file</h3><p><code> 111 ##<br /> 112 ##express-map.txt:<br /> 113 ##<br /> 114 <br /> 115 www1.example.com http://192.168.211.2:8080<br /> 116 www2.example.com http://192.168.211.12:8088<br /> 117 www3.example.com http://192.168.212.10<br /> 118 </code></p></div> 119 120 <div class="example"><h3>Create DBM file</h3><p><code> 121 httxt2dbm -i express-map.txt -o emap<br /> 122 </code></p></div> 123 124 <div class="example"><h3>Configuration</h3><p><code> 125 ProxyExpressEnable on<br /> 126 ProxyExpressDBMFile emap<br /> 127 </code></p></div> 128 </div> 129 130</div> 131<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 132<div class="directive-section"><h2><a name="ProxyExpressDBMType" id="ProxyExpressDBMType">ProxyExpressDBMType</a> <a name="proxyexpressdbmtype" id="proxyexpressdbmtype">Directive</a></h2> 133<table class="directive"> 134<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>DBM type of file.</td></tr> 135<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyExpressDBMFile <type></code></td></tr> 136<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>"default"</code></td></tr> 137<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> 138<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr> 139<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy_express</td></tr> 140<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.13 and later</td></tr> 141</table> 142 <p>The <code class="directive">ProxyExpressDBMType</code> directive 143 controls the DBM type expected by the module. The default 144 is the default DBM type created with <code> 145 <a href="/programs/httxt2dbm.html">httxt2dbm</a></code>.</p> 146 <p>Possible values are (not all may be available at run time):</p> 147<table class="bordered"><tr class="header"><th>Value</th><th>Description</th></tr> 148<tr><td><code>db</code></td><td> Berkeley DB files</td></tr> 149<tr class="odd"><td><code>gdbm</code></td><td> GDBM files</td></tr> 150<tr><td><code>ndbm</code></td><td> NDBM files</td></tr> 151<tr class="odd"><td><code>sdbm</code></td><td> SDBM files (always available)</td></tr> 152<tr><td><code>default</code></td><td> default DBM type</td></tr> 153</table> 154 155 156</div> 157<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 158<div class="directive-section"><h2><a name="ProxyExpressEnable" id="ProxyExpressEnable">ProxyExpressEnable</a> <a name="proxyexpressenable" id="proxyexpressenable">Directive</a></h2> 159<table class="directive"> 160<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable the module functionality.</td></tr> 161<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyExpressEnable [on|off]</code></td></tr> 162<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>off</code></td></tr> 163<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> 164<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr> 165<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy_express</td></tr> 166<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.13 and later</td></tr> 167</table> 168 <p>The <code class="directive">ProxyExpressEnable</code> directive 169 controls whether the module will be active.</p> 170 171</div> 172</div> 173<div class="bottomlang"> 174<p><span>Available Languages: </span><a href="/en/mod/mod_proxy_express.html" title="English"> en </a> | 175<a href="/fr/mod/mod_proxy_express.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a></p> 176</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div> 177<script type="text/javascript"><!--//--><![CDATA[//><!-- 178var comments_shortname = 'httpd'; 179var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_proxy_express.html'; 180(function(w, d) { 181 if (w.location.hostname.toLowerCase() == "httpd.apache.org") { 182 d.write('<div id="comments_thread"><\/div>'); 183 var s = d.createElement('script'); 184 s.type = 'text/javascript'; 185 s.async = true; 186 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; 187 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); 188 } 189 else { 190 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); 191 } 192})(window, document); 193//--><!]]></script></div><div id="footer"> 194<p class="apache">Copyright 2014 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> 195<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- 196if (typeof(prettyPrint) !== 'undefined') { 197 prettyPrint(); 198} 199//--><!]]></script> 200</body></html>