examples - fix reverse-proxy-singlesite regex
This commit is contained in:
parent
bb6d02e0f6
commit
217924fe46
|
@ -301,7 +301,6 @@ You will find more settings about reverse proxy in the [settings section](/1.4/s
|
|||
|
||||
Or alternatively, in your playbook file :
|
||||
```yaml
|
||||
---
|
||||
- hosts: all
|
||||
become: true
|
||||
vars:
|
||||
|
@ -851,6 +850,7 @@ You will find more settings about reverse proxy in the [settings section](/1.4/s
|
|||
SERVER_NAME=app1.example.com app2.example.com app3.example.com
|
||||
HTTP_PORT=80
|
||||
HTTPS_PORT=443
|
||||
MULTISITE=yes
|
||||
DNS_RESOLVERS=8.8.8.8 8.8.4.4
|
||||
USE_REVERSE_PROXY=yes
|
||||
REVERSE_PROXY_URL=/
|
||||
|
@ -896,11 +896,12 @@ You will find more settings about reverse proxy in the [settings section](/1.4/s
|
|||
python3 -m http.server -b 127.0.0.1 8003
|
||||
```
|
||||
|
||||
Configuration of the `variables.env` file :
|
||||
Content of the `my_variables.env` configuration file :
|
||||
```conf
|
||||
SERVER_NAME=app1.example.com app2.example.com app3.example.com
|
||||
HTTP_PORT=80
|
||||
HTTPS_PORT=443
|
||||
MULTISITE=yes
|
||||
DNS_RESOLVERS=8.8.8.8 8.8.4.4
|
||||
USE_REVERSE_PROXY=yes
|
||||
REVERSE_PROXY_URL=/
|
||||
|
@ -909,48 +910,20 @@ You will find more settings about reverse proxy in the [settings section](/1.4/s
|
|||
app3.example.com_REVERSE_PROXY_HOST=http://127.0.0.1:8003
|
||||
```
|
||||
|
||||
In your Ansible inventory, you can use the `variables_env` variable to configure BunkerWeb :
|
||||
In your Ansible inventory, you can use the `variables_env` variable to set the path of configuration file :
|
||||
```yaml
|
||||
all:
|
||||
children:
|
||||
host1:
|
||||
hosts:
|
||||
"Your_IP_Address":
|
||||
vars:
|
||||
variables_env: ../variables.env
|
||||
host2:
|
||||
hosts:
|
||||
"Your_IP_Address":
|
||||
vars:
|
||||
variables_env = variables.env
|
||||
enable_ui=true
|
||||
host3:
|
||||
hosts:
|
||||
"Your_IP_Address":
|
||||
vars:
|
||||
variables_env = ../variables.env
|
||||
custom_site=../site
|
||||
plugins=../plugins
|
||||
[mybunkers]
|
||||
192.168.0.42 variables_env="{{ playbook_dir }}/my_variables.env"
|
||||
```
|
||||
|
||||
Or in INI format :
|
||||
```ini
|
||||
[all]
|
||||
host1
|
||||
host2
|
||||
host3
|
||||
|
||||
[host1:vars]
|
||||
variables_env = ../variables.env
|
||||
|
||||
[host2:vars]
|
||||
variables_env = variables.env
|
||||
enable_ui=true
|
||||
|
||||
[host3:vars]
|
||||
variables_env = ../variables.env
|
||||
custom_site=../site
|
||||
plugins=../plugins
|
||||
Or alternatively, in your playbook file :
|
||||
```yaml
|
||||
- hosts: all
|
||||
become: true
|
||||
vars:
|
||||
- variables_env: "{{ playbook_dir }}/my_variables.env"
|
||||
roles:
|
||||
- bunkerweb
|
||||
```
|
||||
|
||||
Run the playbook :
|
||||
|
@ -1109,7 +1082,7 @@ REAL_IP_HEADER=X-Forwarded-For
|
|||
|
||||
=== "Ansible"
|
||||
|
||||
You will need to add the settings to your `variables.env` file :
|
||||
You will need to add the settings to your `my_variables.env` configuration file :
|
||||
```conf
|
||||
...
|
||||
USE_REAL_IP=yes
|
||||
|
@ -1118,24 +1091,20 @@ REAL_IP_HEADER=X-Forwarded-For
|
|||
...
|
||||
```
|
||||
|
||||
In your Ansible inventory, you can use the `variables_env` variable to configure BunkerWeb :
|
||||
In your Ansible inventory, you can use the `variables_env` variable to set the path of configuration file :
|
||||
```yaml
|
||||
all:
|
||||
children:
|
||||
Groups:
|
||||
hosts:
|
||||
"Your_IP_Address":
|
||||
vars:
|
||||
variables_env: ../variables.env
|
||||
[mybunkers]
|
||||
192.168.0.42 variables_env="{{ playbook_dir }}/my_variables.env"
|
||||
```
|
||||
|
||||
Or in INI format :
|
||||
```ini
|
||||
[all]
|
||||
host
|
||||
|
||||
[all:vars]
|
||||
variables_env = ../variables.env
|
||||
Or alternatively, in your playbook file :
|
||||
```yaml
|
||||
- hosts: all
|
||||
become: true
|
||||
vars:
|
||||
- variables_env: "{{ playbook_dir }}/my_variables.env"
|
||||
roles:
|
||||
- bunkerweb
|
||||
```
|
||||
|
||||
Run the playbook :
|
||||
|
@ -1286,7 +1255,7 @@ REAL_IP_HEADER=proxy_protocol
|
|||
|
||||
=== "Ansible"
|
||||
|
||||
You will need to add the settings to your `variables.env` file :
|
||||
You will need to add the settings to your `my_variables.env` configuration file :
|
||||
```conf
|
||||
...
|
||||
USE_REAL_IP=yes
|
||||
|
@ -1296,24 +1265,20 @@ REAL_IP_HEADER=proxy_protocol
|
|||
...
|
||||
```
|
||||
|
||||
In your Ansible inventory, you can use the `variables_env` variable to configure BunkerWeb :
|
||||
In your Ansible inventory, you can use the `variables_env` variable to set the path of configuration file :
|
||||
```yaml
|
||||
all:
|
||||
children:
|
||||
Groups:
|
||||
hosts:
|
||||
"Your_IP_Address":
|
||||
vars:
|
||||
variables_env: ../variables.env
|
||||
[mybunkers]
|
||||
192.168.0.42 variables_env="{{ playbook_dir }}/my_variables.env"
|
||||
```
|
||||
|
||||
Or in INI format :
|
||||
```ini
|
||||
[all]
|
||||
host
|
||||
|
||||
[all:vars]
|
||||
variables_env = ../variables.env
|
||||
Or alternatively, in your playbook file :
|
||||
```yaml
|
||||
- hosts: all
|
||||
become: true
|
||||
vars:
|
||||
- variables_env: "{{ playbook_dir }}/my_variables.env"
|
||||
roles:
|
||||
- bunkerweb
|
||||
```
|
||||
|
||||
Run the playbook :
|
||||
|
@ -1552,8 +1517,7 @@ Some integrations offer a more convenient way of applying configurations for exa
|
|||
|
||||
=== "Ansible"
|
||||
|
||||
When the variable `custom_configs` is set to "true" , you could use the
|
||||
`custom_configs_path[]` variable to write the configs to the /opt/bunkerweb/configs folder.
|
||||
You can use the `custom_configs_path[]` variable to write the configs to the `/opt/bunkerweb/configs` folder. TODO
|
||||
|
||||
Here is an example for server-http/hello-world.conf :
|
||||
```conf
|
||||
|
|
|
@ -23,9 +23,9 @@ services:
|
|||
- USE_CLIENT_CACHE=yes
|
||||
- USE_GZIP=yes
|
||||
- USE_REVERSE_PROXY=yes
|
||||
- REVERSE_PROXY_URL_1=~ ^/app1/(.+)$$
|
||||
- REVERSE_PROXY_URL_1=~ ^/app1/(.*)$$
|
||||
- REVERSE_PROXY_HOST_1=http://app1/$$1
|
||||
- REVERSE_PROXY_URL_2=~ ^/app2/(.+)$$
|
||||
- REVERSE_PROXY_URL_2=~ ^/app2/(.*)$$
|
||||
- REVERSE_PROXY_HOST_2=http://app2/$$1
|
||||
- |
|
||||
CUSTOM_CONF_SERVER_HTTP_redirects=
|
||||
|
|
Loading…
Reference in New Issue