Name-based Reverse Proxy by DeleGate
Yutaka Sato
July 18, 2008
(preliminary memo.)
DeleGate 9.8.2
supported name-based virtual hosting as a reverse proxy
by newly introduced options for the
MOUNT parameter.
The nvserv
option is for forwarding to name based virtual hosting servers and
the nvhost
option is for acting as a name-based virtual hosting server.
In the following examples, the target server in each MOUNT parameter
is referred with its IP-address.
It can be referred with its name if it is resolvable appropriately
to its address, or if
rserv option is given
to specify the real server name or address.
Example IP-address and names of target servers:
192.168.1.1 www1.local (address-based server)
192.168.1.2 www2.local (address-based server)
192.168.1.3 nww1.local nww2.local (name-based server)
192.168.1.4 nww1.domain nww2.domain (name-based server)
Example IP-address and names of myself (the host of DeleGate):
aa.aa.aa.aa www.domain (address-based server)
xx.xx.xx.xx www1.domain (address-based server)
yy.yy.yy.yy www2.domain (address-based server)
zz.zz.zz.zz nww1.domain nww2.domain (name-based server)
URL-path-based reverse proxy to address-based servers
MOUNT="/v1/* http://192.168.1.1/*"
MOUNT="/v2/* http://192.168.1.2/*"
## the target server is selected based on the URL-path
## http://www.domain/v1/* >>> http://192.168.1.1/*
## http://www.domain/v2/* >>> http://192.168.1.2/*
Address-based virtual hosting to address based servers (ex. vhost=host)
MOUNT="/* http://192.168.1.1/* avhost=www1.domain"
MOUNT="/* http://192.168.1.2/* avhost=www2.domain"
## the target server is selected based on the Host: header
## http://www1.domain/* >>> http://192.168.1.1/*
## http://www2.domain/* >>> http://192.168.1.2/*
URL-path-based reverse proxy to name-based virtual servers
(new)
MOUNT="/v1/* http://192.168.1.3/* nvserv=nww1.local"
MOUNT="/v2/* http://192.168.1.3/* nvserv=nww2.local"
## http://www.domain/v1/* >>> http://nww1.local/*
## http://www.domain/v2/* >>> http://nww2.local/*
Address-based virtual hosting to name-based virtual servers
(new)
MOUNT="/* http://192.168.1.3/* avhost=www1.domain,nvserv=nww1.local"
MOUNT="/* http://192.168.1.3/* avhost=www2.domain,nvserv=nww2.local"
## http://www1.domain/* >>> http://nww1.local/*
## http://www2.domain/* >>> http://nww2.local/*
Name-based virtual hosting to address based servers (ex. vhost=-host)
MOUNT="/* http://192.168.1.1/* nvhost=nww1.domain"
MOUNT="/* http://192.168.1.2/* nvhost=nww2.domain"
## http://nww1.domain/* >>> http://192.168.1.1/*
## http://nww2.domain/* >>> http://192.168.1.2/*
Name-based virtual hosting to name based virtual servers
(new)
MOUNT="/* http://192.168.1.3/* nvhost=nww1.domain,nvserv=nww1.local"
MOUNT="/* http://192.168.1.3/* nvhost=nww2.domain,nvserv=nww2.local"
## http://nww1.domain/* >>> http://nww1.local/*
## http://nww2.domain/* >>> http://nww2.local/*
Name-based virtual hosting to name based virtual servers (through)
(new)
MOUNT="/* http://192.168.1.4/* nvhost=nww1.domain,nvserv=nww1.domain"
MOUNT="/* http://192.168.1.4/* nvhost=nww2.domain,nvserv=nww2.domain"
## http://nww1.domain/* >>> http://nww1.domain/*
## http://nww2.domain/* >>> http://nww2.domain/*
Address or name based transparent proxy (by HTTP Host: header)
NAT based transparent proxy by MOUNT
or SERVER
(new)
SERVER=http MOUNT="/* http://odst.-:-/*"
SERVER=http://odst.-:-
A single DeleGate server as a virtual hosting server or a reverse proxy
can have a set of mixture of name and address-based MOUNT parameters
if the mapping by the set is unique or
pri=priority option
is specified to make the mapping unique.