Add proxy location support
This commit is contained in:
parent
5b6850a50b
commit
3ebb8c1b03
3 changed files with 15 additions and 0 deletions
|
@ -25,6 +25,12 @@ Role Variables
|
||||||
- websocket_location: reverse destination point for websocket config
|
- websocket_location: reverse destination point for websocket config
|
||||||
- websocket_port: websocket port to redirect to
|
- websocket_port: websocket port to redirect to
|
||||||
- websocket: yes/no, enable websocket block in config file
|
- websocket: yes/no, enable websocket block in config file
|
||||||
|
|
||||||
|
- proxy_rule: yes/no, enable specific proxy rule setup
|
||||||
|
- proxy_location: reverse destination point
|
||||||
|
- proxy_path: path to route proxy to
|
||||||
|
- proxy_port: proxy port to redirect to
|
||||||
|
|
||||||
- vhost_name: name of the vhost
|
- vhost_name: name of the vhost
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
|
|
|
@ -15,4 +15,7 @@ vhost_name: default
|
||||||
websocket: no
|
websocket: no
|
||||||
websocket_location: localhost
|
websocket_location: localhost
|
||||||
|
|
||||||
|
proxy_rule: no
|
||||||
|
proxy_location: localhostœ
|
||||||
|
|
||||||
rootws: no
|
rootws: no
|
|
@ -25,6 +25,12 @@
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if proxy_rule %}
|
||||||
|
proxy {{ proxy_path }} http://{{ proxy_location }}:{{ proxy_port }} {
|
||||||
|
transparent
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
log {{ caddy_logs }}/{{ vhost_name }}/access.log {
|
log {{ caddy_logs }}/{{ vhost_name }}/access.log {
|
||||||
rotate_size 100
|
rotate_size 100
|
||||||
rotate_age 30
|
rotate_age 30
|
||||||
|
|
Loading…
Reference in a new issue