rust-rpxy/config-example.toml
2022-06-23 14:09:02 -04:00

38 lines
1.2 KiB
TOML

########################################
# #
# rust-rxpy configuration #
# #
########################################
###################################
# Global settings #
###################################
http_port = 8080
https_port = 8443
###################################
# Backend settings #
###################################
[[backend]]
app_name = 'localhost' # this should be option, if null then same as hostname
hostname = 'localhost'
redirect_to_https = true
reverse_proxy = [
{ path = '*', destination = 'https://192.168.10.0:3000' },
{ path = '/path/to', destination = 'https://192.168.10.1:4000/path/to' },
]
## 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']
denyhosts = ['*']
tls_cert_path = 'localhost1.pem'
tls_cert_key_path = 'localhost1.pem'
[[backend]]
app_name = 'locahost_application'
hostname = 'localhost.localdomain'
redirect_to_https = true
reverse_proxy = [{ path = '/', destination = 'https://www.google.com/' }]
tls_cert_path = 'localhost2.pem'
tls_cert_key_path = 'localhost2.pem'