Add proxy location support

This commit is contained in:
Wilfried OLLIVIER 2019-07-01 22:15:44 +02:00
parent 5b6850a50b
commit 3ebb8c1b03
3 changed files with 15 additions and 0 deletions

View File

@ -25,6 +25,12 @@ Role Variables
- websocket_location: reverse destination point for websocket config
- websocket_port: websocket port to redirect to
- 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
Dependencies

View File

@ -15,4 +15,7 @@ vhost_name: default
websocket: no
websocket_location: localhost
proxy_rule: no
proxy_location: localhostœ
rootws: no

View File

@ -25,6 +25,12 @@
}
{% endif %}
{% if proxy_rule %}
proxy {{ proxy_path }} http://{{ proxy_location }}:{{ proxy_port }} {
transparent
}
{% endif %}
log {{ caddy_logs }}/{{ vhost_name }}/access.log {
rotate_size 100
rotate_age 30