If you are willing to help hiproxy to write documentation, please contact zdying@live.com, thank you!
Introduction
rewrite reference Nginx configuration syntax. With very simple configuration, it is helpful for front-end developer to debug in native with online API or some other environemnts.
The server would scan and monitor rewrite files in each projects while it’s running. If some file are changed, it can update forward rules immediately without restarting the server.
Note: hiproxy support both rewrite and hosts file. If you need only simple domain+port forwarding, you can use host file by referencinghosts.
Basic syntax
Variables
Syntax
1
$variableName
Example
1 2 3 4 5
# 定义变量 set$var_name value
# 使用变量 $var_name
domain
domain specify a domain name and all configuration about the domain name should be in the domain block.
Syntax
1 2 3
[domain_name|variable] => { # ... }
Example
1 2 3 4 5 6 7 8 9 10 11
set$domain some.example.com
# use a domain name directly some.example.com => { # ... }
# or use a variable $domain => { # ... }
Or
1 2 3 4 5 6 7 8 9 10 11
set$domain some.example.com
# use a domain name directly domain some.example.com { # ... }
# or use a variable domain $domain { # ... }
location
location represent a specific path. All configuration about the path should be in the location block.