forked from skx/node-reverse-proxy.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
one-vhost.js
45 lines (41 loc) · 847 Bytes
/
one-vhost.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* This is an example configuration for a reverse proxy which listens
* upon:
*
* 192.168.1.100:80
*
* Each incoming request for the virtual host "example.com" is
* forwarded to the local IP address & port pair:
*
* 127.0.0.1:8080
*
* Any other request is ignored.
*
* Usage:
* -----
*
* To use this configuration file please run:
*
* ./node-reverse-proxy.js --config ./examples/one-vhost.js
*
*/
exports.options = {
/**
* The virtual host we're responding to.
*/
'example.com': {
/**
* The host and port to which we forward the requests.
*/
'host': '127.0.0.1',
'port': '8080'
}
};
/**
* The port we listen upon.
*/
exports.port = 80;
/**
* The addresses we will listen upon.
*/
exports.bind = new Array("192.168.1.100", "127.0.0.1");