Apache. Документация на русском


Разделы:   1    2    3    4    5    6    7    8    9      10      11    12    13    14    15    16  

Раздел 10. Apache modules

Пункты:   85    86    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121    122    123    124    125    126    127    128    129    130    131    132    133    134    135    136    137    138    139    140    141    142    143    144    145    146    147    148    149    150    151    152    153    154    155    156    157    158    159    160    161    163    164    165    166    167    168    170    171    172      173      174    175    176    177    178    179    180    181    182    183    184    185    186    187    188    189    190    191    192    193    194    195    196    197    198    199    200    201    203    204    205    206    207    208    209    210    211    212    213  

 <         > 
RU          EN  

Пункт 173. Apache Module mod_proxy_express
Description:Dynamic mass reverse proxy extension for mod_proxy
Status:Extension
Module Identifier:proxy_express_module
Source File:mod_proxy_express.c

Summary

This module creates dynamically configured mass reverse proxies, by mapping the Host: header of the HTTP request to a server name and backend URL stored in a DBM file. This allows for easy use of a huge number of reverse proxies with no configuration changes. It is much less feature-full than mod_proxy_balancer , which also provides dynamic growth, but is intended to handle much, much larger numbers of backends. It is ideally suited as a front-end HTTP switch and for micro-services architectures.

This module requires the service of mod_proxy .

Warning

Do not enable proxying until you have secured your server. Open proxy servers are dangerous both to your network and to the Internet at large.

Limitations

  • This module is not intended to replace the dynamic capability of mod_proxy_balancer . Instead, it is intended to be mostly a lightweight and fast alternative to using mod_rewrite with RewriteMap and the [P] flag for mapped reverse proxying.
  • It does not support regex or pattern matching at all.
  • It emulates:
    <VirtualHost *:80>
     ServerName front.end.server
     ProxyPass "/" "back.end.server:port"
     ProxyPassReverse "/" "back.end.server:port"
    </VirtualHost>
    That is, the entire URL is appended to the mapped backend URL. This is in keeping with the intent of being a simple but fast reverse proxy switch.

ProxyExpressDBMFile Directive

Description:Pathname to DBM file.
Syntax: ProxyExpressDBMFile <pathname>
Default: None
Context:server config, virtual host
Status:Extension
Module:mod_proxy_express
Compatibility:Available in Apache 2.3.13 and later

The ProxyExpressDBMFile directive points to the location of the Express map DBM file. This file serves to map the incoming server name, obtained from the Host: header, to a backend URL.

Note

The file is constructed from a plain text file format using the httxt2dbm utility.

ProxyExpress map file

##
##express-map.txt:
##

www1.example.com http://192.168.211.2:8080
www2.example.com http://192.168.211.12:8088
www3.example.com http://192.168.212.10

Create DBM file

httxt2dbm -i express-map.txt -o emap

Configuration

ProxyExpressEnable on
ProxyExpressDBMFile emap

ProxyExpressDBMType Directive

Description:DBM type of file.
Syntax: ProxyExpressDBMFile <type>
Default: "default"
Context:server config, virtual host
Status:Extension
Module:mod_proxy_express
Compatibility:Available in Apache 2.3.13 and later

The ProxyExpressDBMType directive controls the DBM type expected by the module. The default is the default DBM type created with httxt2dbm .

Possible values are (not all may be available at run time):

ValueDescription
db Berkeley DB files
gdbm GDBM files
ndbm NDBM files
sdbm SDBM files (always available)
default default DBM type

ProxyExpressEnable Directive

Description:Enable the module functionality.
Syntax: ProxyExpressEnable [on|off]
Default: off
Context:server config, virtual host
Status:Extension
Module:mod_proxy_express
Compatibility:Available in Apache 2.3.13 and later

The ProxyExpressEnable directive controls whether the module will be active.



 <         > 

Пункты:   85    86    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121    122    123    124    125    126    127    128    129    130    131    132    133    134    135    136    137    138    139    140    141    142    143    144    145    146    147    148    149    150    151    152    153    154    155    156    157    158    159    160    161    163    164    165    166    167    168    170    171    172      173      174    175    176    177    178    179    180    181    182    183    184    185    186    187    188    189    190    191    192    193    194    195    196    197    198    199    200    201    203    204    205    206    207    208    209    210    211    212    213