vhost: support proxying to unix sockets
This commit is contained in:
@@ -30,9 +30,13 @@
|
||||
'basicauth': item.basicauth | default(vhost_basicauth),
|
||||
'basicauth_users': item.basicauth_users | default(vhost_basicauth_users),
|
||||
|
||||
'proxy_target_port': item.proxy_target_port | default(vhost_proxy_target_port if vhost_type == 'reverse_proxy' else ''),
|
||||
'proxy_target_host': item.proxy_target_host | default(vhost_proxy_target_host),
|
||||
'proxy_target_netproto': item.proxy_target_netproto | default(vhost_proxy_target_netproto),
|
||||
'proxy_target_protocol': item.proxy_target_protocol | default(vhost_proxy_target_protocol),
|
||||
'proxy_target_host': item.proxy_target_host | default(vhost_proxy_target_host),
|
||||
'proxy_target_port': item.proxy_target_port | default(vhost_proxy_target_port if
|
||||
vhost_type == 'reverse_proxy' and vhost_proxy_target_netproto == 'tcp' else ''),
|
||||
'proxy_target_socket': item.proxy_target_socket | default(vhost_proxy_target_socket if
|
||||
vhost_type == 'reverse_proxy' and vhost_proxy_target_netproto == 'unix' else ''),
|
||||
'proxy_delete_headers': item.proxy_delete_headers | default(vhost_proxy_delete_headers),
|
||||
|
||||
'redirect_target': item.redirect_target | default(vhost_redirect_target if vhost_type == 'redirect' else ''),
|
||||
@@ -45,5 +49,5 @@
|
||||
loop: "{{ vhost_locations + [{'path': ''}] }}"
|
||||
|
||||
- name: "Setup {{ vhost_id + ' vhost on ' + vhost_web_server }}"
|
||||
ansible.builtin.include_tasks: "{{ vhost_web_server }}.yml"
|
||||
ansible.builtin.include_tasks: "{{ vhost_web_server }}.yaml"
|
||||
when: vhost_web_server != 'none'
|
||||
|
||||
Reference in New Issue
Block a user