update example config
This commit is contained in:
parent
3246f1014b
commit
6365fe298f
2 changed files with 29 additions and 23 deletions
|
|
@ -4,7 +4,6 @@
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
**WIP Project**
|
**WIP Project**
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
|
||||||
|
|
@ -29,39 +29,46 @@ default_app = 'another_localhost'
|
||||||
###################################
|
###################################
|
||||||
# Backend settings #
|
# Backend settings #
|
||||||
###################################
|
###################################
|
||||||
[application]
|
[apps]
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
## Registering a backend app served by a domain name "localhost"
|
||||||
[apps.localhost]
|
[apps.localhost]
|
||||||
server_name = 'localhost'
|
server_name = 'localhost' # Domain name
|
||||||
reverse_proxy = [
|
|
||||||
# default destination if path is not specified
|
|
||||||
# Array for load balancing
|
|
||||||
{ upstream = [
|
|
||||||
{ location = 'www.yahoo.com', tls = true },
|
|
||||||
{ location = 'www.yahoo.co.jp', tls = true },
|
|
||||||
], upstream_options = [
|
|
||||||
"override_host",
|
|
||||||
] },
|
|
||||||
{ path = '/maps', upstream = [
|
|
||||||
{ location = 'www.bing.com', tls = true },
|
|
||||||
{ location = 'www.bing.co.jp', tls = true },
|
|
||||||
], upstream_options = [
|
|
||||||
"override_host",
|
|
||||||
"upgrade_insecure_requests",
|
|
||||||
] },
|
|
||||||
]
|
|
||||||
# Optional: TLS setting. if https_port is specified and tls is true above, this must be given.
|
# Optional: TLS setting. if https_port is specified and tls is true above, this must be given.
|
||||||
tls = { https_redirection = true, tls_cert_path = '/certs/localhost.crt', tls_cert_key_path = '/certs/localhost.key' } # for docker volume mounted certs
|
tls = { https_redirection = true, tls_cert_path = '/certs/localhost.crt', tls_cert_key_path = '/certs/localhost.key' } # for docker volume mounted certs
|
||||||
#tls = { https_redirection = true, tls_cert_path = './localhost.crt', tls_cert_key_path = './localhost.key' } # for local
|
#tls = { https_redirection = true, tls_cert_path = './localhost.crt', tls_cert_key_path = './localhost.key' } # for local
|
||||||
|
|
||||||
|
## TODO
|
||||||
## List of destinations to send data to.
|
|
||||||
## At this point, round-robin is used for load-balancing if multiple URLs are specified.
|
|
||||||
# allowhosts = ['127.0.0.1', '::1', '192.168.10.0/24'] # TODO
|
# allowhosts = ['127.0.0.1', '::1', '192.168.10.0/24'] # TODO
|
||||||
# denyhosts = ['*'] # TODO
|
# denyhosts = ['*'] # TODO
|
||||||
|
|
||||||
|
# default destination if "path" is not specified
|
||||||
|
[[apps.localhost.reverse_proxy]]
|
||||||
|
# List of destinations to send data to. At this point, round-robin is used for load-balancing if multiple URLs are specified.
|
||||||
|
upstream = [
|
||||||
|
{ location = 'www.yahoo.com', tls = true },
|
||||||
|
{ location = 'www.yahoo.co.jp', tls = true },
|
||||||
|
]
|
||||||
|
upstream_options = ["override_host"]
|
||||||
|
|
||||||
|
# Non-default destination in "localhost" app, which is routed by "path"
|
||||||
|
[[apps.localhost.reverse_proxy]]
|
||||||
|
path = '/maps'
|
||||||
|
upstream = [
|
||||||
|
{ location = 'www.bing.com', tls = true },
|
||||||
|
{ location = 'www.bing.co.jp', tls = true },
|
||||||
|
]
|
||||||
|
upstream_options = ["override_host", "upgrade_insecure_requests"]
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Another application backend servied by different domain name
|
||||||
[apps.another_localhost]
|
[apps.another_localhost]
|
||||||
server_name = 'localhost.localdomain'
|
server_name = 'localhost.localdomain'
|
||||||
reverse_proxy = [{ upstream = [{ location = 'www.google.com', tls = true }] }]
|
reverse_proxy = [{ upstream = [{ location = 'www.google.com', tls = true }] }]
|
||||||
|
######################################################################
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
# Experimantal settings #
|
# Experimantal settings #
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue