Просмотр исходного кода

add ngnix-status to config

add doc
pull/139/head
p5t2vspoqqw 6 лет назад
Родитель
Сommit
deeefac84c
4 измененных файлов: 26 добавлений и 0 удалений
  1. +13
    -0
      docs/configuring-playbook-ngnix.md
  2. +2
    -0
      docs/configuring-playbook.md
  3. +2
    -0
      roles/matrix-nginx-proxy/defaults/main.yml
  4. +9
    -0
      roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2

+ 13
- 0
docs/configuring-playbook-ngnix.md Просмотреть файл

@@ -0,0 +1,13 @@
# 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_nginx_status_enabled: true
```

+ 2
- 0
docs/configuring-playbook.md Просмотреть файл

@@ -43,6 +43,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)

- [Setting up the REST authentication password provider module](configuring-playbook-rest-auth.md) (optional, advanced)


+ 2
- 0
roles/matrix-nginx-proxy/defaults/main.yml Просмотреть файл

@@ -1,5 +1,7 @@
matrix_nginx_proxy_enabled: true

matrix_nginx_proxy_nginx_status_enabled: false

# We use an official nginx image, which we fix-up to run unprivileged.
# An alternative would be an `nginxinc/nginx-unprivileged` image, but
# those as more frequently out of date.


+ 9
- 0
roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2 Просмотреть файл

@@ -4,6 +4,15 @@ server {

server_tokens off;

{% if matrix_nginx_proxy_nginx_status_enabled %}
location /nginx_status {
stub_status on;
access_log off;
allow {{ ansible_default_ipv4.address }};
deny all;
}
{% endif %}

location /.well-known/acme-challenge {
{% if matrix_nginx_proxy_enabled %}
{# Use the embedded DNS resolver in Docker containers to discover the service #}


Загрузка…
Отмена
Сохранить