Przeglądaj źródła

Merge pull request #234 from ugs9fsy71cb/master

Serve nginx_status to matrix.DOMAIN
pull/239/head
Slavi Pantaleev 6 lat temu
committed by GitHub
rodzic
commit
4abca27df7
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 41 dodań i 0 usunięć
  1. +23
    -0
      docs/configuring-playbook-ngnix.md
  2. +2
    -0
      docs/configuring-playbook.md
  3. +5
    -0
      roles/matrix-nginx-proxy/defaults/main.yml
  4. +11
    -0
      roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-synapse.conf.j2

+ 23
- 0
docs/configuring-playbook-ngnix.md Wyświetl plik

@@ -0,0 +1,23 @@
# Configure Ngnix (optional, advanced)

By default, this playbook installs its own nginx webserver (in a Docker container) which listens on ports 80 and 443.
If that's alright, you can skip this.


## Using Ngnix status

This will serve a statuspage to the hosting machine only. Useful for monitoring software like [longview](https://www.linode.com/docs/platform/longview/longview-app-for-nginx/)

```yaml
matrix_nginx_proxy_proxy_matrix_nginx_status_enabled: true
```

This will serve the status page under ```https://matrix.DOMAIN/nginx_status```

By default, if ```matrix_nginx_proxy_nginx_status_enabled``` is enabled, access to the status page would be allowed from the local IP address of the server. If you wish to allow access from other IP addresses, you can provide them as a list:

```yaml
matrix_nginx_proxy_proxy_matrix_nginx_status_allowed_addresses:
- 8.8.8.8
- 1.1.1.1
```

+ 2
- 0
docs/configuring-playbook.md Wyświetl plik

@@ -44,6 +44,8 @@ When you're done with all the configuration you'd like to do, continue with [Ins

- [Serving your base domain using this playbook's nginx server](configuring-playbook-base-domain-serving.md) (optional)

- [Configure Ngnix (optional, advanced)](configuring-playbook-ngnix.md) (optional, advanced)

- [Using your own webserver, instead of this playbook's nginx proxy](configuring-playbook-own-webserver.md) (optional, advanced)

- [Adjusting TURN server configuration](configuring-playbook-turn.md) (optional, advanced)


+ 5
- 0
roles/matrix-nginx-proxy/defaults/main.yml Wyświetl plik

@@ -152,3 +152,8 @@ matrix_ssl_lets_encrypt_support_email: ~
matrix_ssl_base_path: "{{ matrix_base_data_path }}/ssl"
matrix_ssl_config_dir_path: "{{ matrix_ssl_base_path }}/config"
matrix_ssl_log_dir_path: "{{ matrix_ssl_base_path }}/log"


# ngnix status page configurations.
matrix_nginx_proxy_proxy_matrix_nginx_status_enabled: false
matrix_nginx_proxy_proxy_matrix_nginx_status_allowed_addresses: ['{{ ansible_default_ipv4.address }}']

+ 11
- 0
roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-synapse.conf.j2 Wyświetl plik

@@ -17,6 +17,17 @@ server {
{% endif %}
}

{% if matrix_nginx_proxy_proxy_matrix_nginx_status_enabled %}
location /nginx_status {
stub_status on;
access_log off;
{% for address in matrix_nginx_proxy_proxy_matrix_nginx_status_allowed_addresses %}
allow {{ address }};
{% endfor %}
deny all;
}
{% endif %}

location / {
return 301 https://$http_host$request_uri;
}


Ładowanie…
Anuluj
Zapisz